#include <phapp.h>
#include <phsvc.h>
#include <phsvccl.h>
#include <settings.h>
#include <emenu.h>
#include <shlwapi.h>
#include <winsta.h>
#include <windowsx.h>
Go to the source code of this file.
|
| #define | SIP(String, Integer) { (String), (PVOID)(Integer) } |
| |
|
| INT_PTR CALLBACK | PhpRunAsDlgProc (_In_ HWND hwndDlg, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam) |
| |
| VOID | PhSetDesktopWinStaAccess (VOID) |
| | Sets the access control lists of the current window station and desktop to allow all access.
|
| |
| VOID | PhpSplitUserName (_In_ PWSTR UserName, _Out_ PPH_STRING *DomainPart, _Out_ PPH_STRING *UserPart) |
| |
| VOID | PhShowRunAsDialog (_In_ HWND ParentWindowHandle, _In_opt_ HANDLE ProcessId) |
| |
| NTSTATUS | PhExecuteRunAsCommand (_In_ PPH_RUNAS_SERVICE_PARAMETERS Parameters) |
| | Executes the run-as service.
|
| |
| NTSTATUS | PhExecuteRunAsCommand2 (_In_ HWND hWnd, _In_ PWSTR Program, _In_opt_ PWSTR UserName, _In_opt_ PWSTR Password, _In_opt_ ULONG LogonType, _In_opt_ HANDLE ProcessIdWithToken, _In_ ULONG SessionId, _In_ PWSTR DesktopName, _In_ BOOLEAN UseLinkedToken) |
| | Starts a program as another user.
|
| |
| NTSTATUS | PhRunAsServiceStart (_In_ PPH_STRING ServiceName) |
| |
| NTSTATUS | PhInvokeRunAsService (_In_ PPH_RUNAS_SERVICE_PARAMETERS Parameters) |
| |
| #define SIP |
( |
|
String, |
|
|
|
Integer |
|
) |
| { (String), (PVOID)(Integer) } |
Executes the run-as service.
- Parameters
-
| Parameters | The run-as parameters. |
Definition at line 812 of file runas.c.
| NTSTATUS PhExecuteRunAsCommand2 |
( |
_In_ HWND |
hWnd, |
|
|
_In_ PWSTR |
Program, |
|
|
_In_opt_ PWSTR |
UserName, |
|
|
_In_opt_ PWSTR |
Password, |
|
|
_In_opt_ ULONG |
LogonType, |
|
|
_In_opt_ HANDLE |
ProcessIdWithToken, |
|
|
_In_ ULONG |
SessionId, |
|
|
_In_ PWSTR |
DesktopName, |
|
|
_In_ BOOLEAN |
UseLinkedToken |
|
) |
| |
Starts a program as another user.
- Parameters
-
| hWnd | A handle to the parent window. |
| Program | The command line of the program to start. |
| UserName | The user to start the program as. The user name should be specified as: domain\name. This parameter can be NULL if ProcessIdWithToken is specified. |
| Password | The password for the specified user. If there is no password, specify an empty string. This parameter can be NULL if ProcessIdWithToken is specified. |
| LogonType | The logon type for the specified user. This parameter can be 0 if ProcessIdWithToken is specified. |
| ProcessIdWithToken | The ID of a process from which to duplicate the token. |
| SessionId | The ID of the session to run the program under. |
| DesktopName | The window station and desktop to run the program under. |
| UseLinkedToken | Uses the linked token if possible. |
- Return values
-
| STATUS_CANCELLED | The user cancelled the operation. |
Definition at line 921 of file runas.c.
| INT_PTR CALLBACK PhpRunAsDlgProc |
( |
_In_ HWND |
hwndDlg, |
|
|
_In_ UINT |
uMsg, |
|
|
_In_ WPARAM |
wParam, |
|
|
_In_ LPARAM |
lParam |
|
) |
| |
| NTSTATUS PhRunAsServiceStart |
( |
_In_ PPH_STRING |
ServiceName | ) |
|
Sets the access control lists of the current window station and desktop to allow all access.
Definition at line 737 of file runas.c.
| VOID PhShowRunAsDialog |
( |
_In_ HWND |
ParentWindowHandle, |
|
|
_In_opt_ HANDLE |
ProcessId |
|
) |
| |