Question

If my application requires itself to be run as an administrator, and then executes

Process.Start("notepad.exe");

Will the child process be run as administrator as well, or do I need to run it as administrator specifically?

Was it helpful?

Solution

Yes, in most cases.

From MSDN:

Each application that requires the administrator access token must prompt the administrator for consent. The one exception is the relationship that exists between parent and child processes. Child processes inherit the user access token from the parent process.

Your child process will have the same rights as the parent. There are some exceptions. I'd suggest reading this page:

http://technet.microsoft.com/en-us/library/dd835561(v=ws.10).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top