I am trying to run my c# exe as an system account. How can I do that. I\'ve tried
To the best of my knowledge you can not force your app to run as SYSTEM. Either your app must be a service and the service is setup to run as System or you must use a tool like PsExec to launch your executable as system.
psexec.exe -i -s YourProgram.exe
When using requestedExecutionlevel
the only 3 valid options are
requireAdministrator
- prompt for UAC always (even if the user is not an administrator).asInvoker
- never prompt for UAC.highestAvailable
- prompt for UAC if the user is a member of the Administrators group but do not prompt and run as a normal user if the user is not a member of the group.