locked
Launching process in non-elevated mode RRS feed

  • Question

  • I have setup program that is automatically elevated by Vista. The setup program launches the application using CreateProcess. The application as child process inherits elevated mode of parent setup process. How can I launch the app from setup in normal, non-elevated mode?
    Tuesday, November 28, 2006 9:12 PM

Answers

  • The best practice is to have your initial setup program run "asInvoker", it's job would be to launch the application installer "runElevated" and wait for its completion then launch the app.

    Launching the application from the installer is often not a good idea: the user might have elevated using a different account.  Imagine a user Toby (not a member of the administrator group) clicks on your setup.exe.  At the elvation prompt he asks his mother Abby to type in her account and password.  The installation continues with no problems and finally launches the application--as Abby.

    Wednesday, November 29, 2006 5:14 PM