c# Programming Glossary: token_query
Detect if running as Administrator with or without elevated privileges? http://stackoverflow.com/questions/1220213/detect-if-running-as-administrator-with-or-without-elevated-privileges uint STANDARD_RIGHTS_READ 0x00020000 private static uint TOKEN_QUERY 0x0008 private static uint TOKEN_READ STANDARD_RIGHTS_READ TOKEN_QUERY.. 0x0008 private static uint TOKEN_READ STANDARD_RIGHTS_READ TOKEN_QUERY DllImport advapi32.dll SetLastError true return MarshalAs UnmanagedType.Bool..
Process.Start with different credentials with UAC on http://stackoverflow.com/questions/2313553/process-start-with-different-credentials-with-uac-on 0x0002 const Int32 TOKEN_IMPERSONATE 0x0004 const Int32 TOKEN_QUERY 0x0008 const Int32 TOKEN_QUERY_SOURCE 0x0010 const Int32 TOKEN_ADJUST_PRIVILEGES.. 0x0004 const Int32 TOKEN_QUERY 0x0008 const Int32 TOKEN_QUERY_SOURCE 0x0010 const Int32 TOKEN_ADJUST_PRIVILEGES 0x0020 const.. TOKEN_ASSIGN_PRIMARY TOKEN_DUPLICATE TOKEN_IMPERSONATE TOKEN_QUERY TOKEN_QUERY_SOURCE TOKEN_ADJUST_PRIVILEGES TOKEN_ADJUST_GROUPS..
Using Process.Start() to start a process as a different user from within a Windows Service http://stackoverflow.com/questions/362419/using-process-start-to-start-a-process-as-a-different-user-from-within-a-windo public long Luid public int Attr static internal const int TOKEN_QUERY 0x00000008 internal const int SE_PRIVILEGE_ENABLED 0x00000002.. int TOKEN_ADJUST_PRIVILEGES 0x00000020 internal const int TOKEN_QUERY 0x00000008 internal const int TOKEN_DUPLICATE 0x0002 internal..
Start a windows service and launch cmd http://stackoverflow.com/questions/4147821/start-a-windows-service-and-launch-cmd private const int TOKEN_DUPLICATE 0x2 private const int TOKEN_QUERY 0x00000008 summary Launches a process for the current logged.. bool result DuplicateTokenEx p MAXIMUM_ALLOWED TOKEN_QUERY TOKEN_DUPLICATE IntPtr.Zero SecurityIdentification SecurityIdentification..
Set System Time Zone from .NET http://stackoverflow.com/questions/808736/set-system-time-zone-from-net int TOKEN_ADJUST_PRIVILEGES 0x00000020 public const int TOKEN_QUERY 0x00000008 public const int SE_PRIVILEGE_ENABLED 0x00000002.. OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY out token Assert.IsTrue retval 0 String.Format OpenProcessToken..
|