Start a .Net Process as a Different User
问题 I want to start a Process with Admin rights. When I run the code below the Process complains saying it needs Admin rights: public class ImpersonationHelper : IDisposable { IntPtr m_tokenHandle = new IntPtr(0); WindowsImpersonationContext m_impersonatedUser; #region Win32 API Declarations const int LOGON32_PROVIDER_DEFAULT = 0; const int LOGON32_LOGON_INTERACTIVE = 2; //This parameter causes LogonUser to create a primary token. [DllImport(\"advapi32.dll\", SetLastError = true)] public static