Search code examples
windowswinapiwindows-vistamanifestwindows-security

How to run a process as current user privilege from an admin process


When a setup program(built by like Inno Setup) does launch a process, the process always be run as administrator privilege. -because setup program had been run as admin.

I want to run the child process as current user's privilege.
Is there a good way?


Solution

  • Although it is not considered best practice (or even good practice), it is possible to launch a medium IL process from a high/admin IL process:

    See this post on codeproject

    I can confirm that this code works on Vista 32 and 64-bit with and without UAC enabled.