views:

157

answers:

1

In Windows 7 (Vista too maybe) you can set a property of a desktop shortcut to "Run as Administrator". So every time the shortcut is used to application is invoked with Administrator privileges or the use is asked for an admin account.

I know I can request/force Administrator privileges with a manifest file for my application but I need to set the privileges for applications that are not mine. As Installer Software I use SetUp Factory 8. It will create a shortcut but doesn't set "Run as Administrator".

So far I set the option with every customer manually after install but that is a lot of work. I want to set "Run as Administrator" for applications via a program/script (like editing the shortcut) or in any other way.

I know this is not exactly a programming related question but I am sure many developers have this kind of problem.

+3  A: 

You know that you can embed a manifest, but it seems like you don't know you can also have an external manifest. You don't need to compile the executable for this. Just name the file whatever.exe.manifest and put it in the same folder as whatever.exe. If that manifest says requireAdministrator, you'll request elevation on every run. Have your installer copy the manifest wherever it copies the exe.

Kate Gregory
That's it! I will try. Thanks a lot.
Holli