¡@

Home 

c# Programming Glossary: duplicatetokenex

Process.Start with different credentials with UAC on

http://stackoverflow.com/questions/2313553/process-start-with-different-credentials-with-uac-on

lpProcessInformation DllImport advapi32.dll EntryPoint DuplicateTokenEx extern static Boolean DuplicateTokenEx IntPtr ExistingTokenHandle.. EntryPoint DuplicateTokenEx extern static Boolean DuplicateTokenEx IntPtr ExistingTokenHandle UInt32 dwDesiredAccess ref SECURITY_ATTRIBUTES.. Marshal.SizeOf sa IntPtr hUserTokenDup IntPtr.Zero DuplicateTokenEx hPToken Int32 MAXIMUM_ALLOWED ref sa Int32 SECURITY_IMPERSONATION_LEVEL.SecurityIdentification..

Possible to launch a process in a user's session from a service?

http://stackoverflow.com/questions/3128017/possible-to-launch-a-process-in-a-users-session-from-a-service

GetCurrentProcess MAXIMUM_ALLOWED hProcessToken bSuccess DuplicateTokenEx hProcessToken MAXIMUM_ALLOWED NULL SecurityImpersonation TokenPrimary..

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

CharSet CharSet.Auto SetLastError true extern static bool DuplicateTokenEx IntPtr hExistingToken uint dwDesiredAccess ref SECURITY_ATTRIBUTES.. Marshal.GetLastWin32Error primaryToken new IntPtr result DuplicateTokenEx token 0 ref processAttributes SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation..

Start a windows service and launch cmd

http://stackoverflow.com/questions/4147821/start-a-windows-service-and-launch-cmd

CharSet.Auto SetLastError true public extern static bool DuplicateTokenEx IntPtr hExistingToken uint dwDesiredAccess IntPtr lpTokenAttributes.. processExe IntPtr p GetCurrentUserToken bool result DuplicateTokenEx p MAXIMUM_ALLOWED TOKEN_QUERY TOKEN_DUPLICATE IntPtr.Zero SecurityIdentification.. out duplicate Debug.WriteLine string.Format DuplicateTokenEx result 0 result Debug.WriteLine string.Format duplicate 0 duplicate..

How can I get elevated permissions (UAC) via impersonation under a non-interactive login?

http://stackoverflow.com/questions/5098121/how-can-i-get-elevated-permissions-uac-via-impersonation-under-a-non-interacti

native LogonUser network logontype default provider and DuplicateTokenEx impersonation primary token then WindowsIdentity.Impersonate..

Calling CreateProcessAsUser from C#

http://stackoverflow.com/questions/668389/calling-createprocessasuser-from-c-sharp

Marshal.SizeOf duplicateTokenAttrs if WinApi.DuplicateTokenEx hUserToken 0 ref duplicateTokenAttrs SECURITY_IMPERSONATION_LEVEL.SecurityImpersonation.. eluding me CreateProcessAsUser function LogonUser function DuplicateTokenEx function Edit I've just tried out Mitch's suggestion but unfortunately..