views:

657

answers:

3

Hi

I have created setup project in Visual Studio 2008. How do I run this setup with admin privileges - I have tried Right-Click, run as administrator. Vista does not prompt me for password. Am I missing something?

PK

A: 

First question: Is UAC enabled?

If you want to be sure to run the setup with an elevated token you can always open an elevated command prompt and run the setup from there. To get the elevated command prompt click on Start and then type cmd followed by Ctrl+Shift+Enter.

0xA3
+1  A: 

When you right-click and choose "Run as administrator", do you get any kind of popup dialog at all? Also, does your setup application actually run?

If you get a "Windows needs your permission to continue" dialog, with no password entry box, then you're already logged on as an Adminstrator and you're just being prompted to grant High integrity to your application. If you want to be prompted for a password, you'll need to log in with a Standard user account.

If you get no popup dialog at all, then my guess is one of the following has happened:

  • You have User Account Control (UAC) turned off completely Check under "User Accounts" in Control Panel.
  • You're running from a Standard user account, and UAC is configured as "No prompt: fail and do not start the program if it required admin rights". Obviously this is only relevant if your application fails to start.

More info on UAC here.

snowcrash09
A: 

Does the setup compile an MSI, an exe or both? If the setup is just an MSI file after compile the MSI setup should ask you to elevate right before it actually starts to install the application (usually on the "Ready to Install" page).

Joshua