How to run the program as a normal user from the installer with a high level of UAC

I am writing an NSIS installer, and the installer raises "as an administrator" as needed in Windows 7 / vista. I need to run the installed program at the end of the installation and not want to run it with the same privileges as the installer.

Regular NSIS exec commands execute a child process with the same permissions as the installer.

There is a UAC plugin for NSIS, but the documentation on it is small and it seems v. new; I would prefer not to use this plugin.

Ideally, I am looking for a small .exe that I can enable that will run the target program without raising UAC. Does it exist?

Any other suggestions?

Thanks!

+7
installer uac nsis
source share
2 answers

You have only two options:

  • Uncheck and uncheck (when starting on NT6 +)
  • Use the UAC plugin (this is not new, but ), so I suggest you just go to the first option)

There is no external program that you can use, since it is impossible to return to the original user using an elevated process (you can try and get pretty close, but he will not get the right user in each case)

+4
source share

I found the following that could be wrapped in a simple command line utility:

http://brandonlive.com/2008/04/27/getting-the-shell-to-run-an-application-for-you-part-2-how/

It took about an hour to get this code for my project, and it works flawlessly.;)

0
source share

All Articles