View Full Version : Force App to run as administrator in Vista

05-08-2007, 11:19 PM
I have an app that needs to be run as administrator. After compiling
my app in VB6, I check off the checkbox that says run as administrator
in the properties window through windows. Then I build my setup in
Installshield. After it installs on another PC, the program no longer
runs as administrator and this checkbox is unchecked. How can I force
it to install this application to require the app to run as
administrator? The only way I know of is to change the filename to
include the word setup, update, ect. which I don't want to do. What's the easiest way to do this?

05-09-2007, 02:35 AM
You must also set the "Required Execution Level" to "Administratior" in the "Build your Release" settings.

Note that you will not get rid of the AUC prompt in standard Vista installations (unless it is disabled). But this is the correct behaviour.

Note remember to sign your installation for Vista, otherwise you get more AUC dialog prompts during installatons and uninstallations.


05-09-2007, 09:21 AM
I think the original question targets making his application always request administrator privileges. For that you have to do the same thing to your exe that the Require Administrator option does to setup.exe. That is, you need to set the Vista portion of your exe's manifest accordingly. See, among other Microsoft resources, the UAC blog post: http://blogs.msdn.com/uac/archive/2006/06/28/certified-for-windows-vista-software-logo-requirements.aspx

(A later post mentions using an external manifest, or mt.exe to embed one: http://blogs.msdn.com/uac/archive/2006/07/28/susan.aspx)

05-09-2007, 01:14 PM
I tried the manifest but could not get it working. Does anyone have any working examples on how to get this running?