Elevated privileges for MSI Package in Vista.

Got a problem you cannot solve? Try here.
Marimuthu
Posts: 2
Joined: Wed Jan 10, 2007 5:00 am

Elevated privileges for MSI Package in Vista.

Postby Marimuthu » Wed Jan 10, 2007 5:06 am

Hi,

How does one build in Vista a MSI package with elevated privilege such that UAC dialog pops up asking for user consent to proceed (Allow /Cancel) when the MSI setup is clicked upon?

I tried using the Orca tool making few changes as mentioned in a number of fourms but to no avail.
Could anybody guide me in achieving the above mentioned elevation in MSI?.
I am using Installshield 12 pro to package the MSI.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Jan 10, 2007 5:05 pm

This is handled internally by InstallAware. If you are an admin, you will get the UAC account so you will be able to elevate the setup. If you are a user, you will not get an admin password dialog, so you will be able to proceed with the installation normally (without admin privileges, of course). If you are a user and do have an admin password, then you can simply run the setup file as the admin user, and again achieve complete elevation.

So with InstallAware there is no need to manually specify this option, as packages always use the highest privileges possible, and eliminate the need for unnecessary/confusing prompts whenever possible.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Marimuthu
Posts: 2
Joined: Wed Jan 10, 2007 5:00 am

Elevated privileges for MSI Package in Vista.

Postby Marimuthu » Thu Jan 11, 2007 2:22 am

But my current requirment is to prompt for the UAC dialog once the user clicks on the MSI package when I am logged in as an Admin.
Currently the UAC is prompted when we try to copy files onto restricted folders like the Program Files.

I want the UAC prompt to appear when MSI package is double-clicked asking for my Consent to proceed.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Jan 12, 2007 3:20 pm

If you are logged in as admin, you will get the UAC prompt. As I have already explained, InstallAware will try to use the full privilege set, so it will try to elevate and display the UAC dialog when you are logged in as admin.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

andrejzr
Posts: 68
Joined: Sun Jun 25, 2006 9:17 am

Postby andrejzr » Tue Feb 06, 2007 5:29 am

Hello Michael,

I wanted to ask the same question about UAC. My install requires the Administrative privileges to run - this is also one of the conditions for install to run. In such cases, it would make sense that the install executable would include the manifest with "requireAdministrator" privileges.

If the application "requires" Admin privileges, in Vista it should have the appropirate manifest with it. I understand that all setups do not require this, and that's why you do not include this in the setup executale by default. But I dare to think that this should be a setting of the install project; installation of such packages would be smoother on Vista.

- Is there any chance to change the privileges inside the manifest of setup executable?
- Do you think my suggestion makes sense? Do you already have this on any of the wish lists for future updates? (in other words, any chance for such update to be in the future releases)


Thanks
Andrej

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Feb 06, 2007 10:45 am

No, this is not going to be required for you.

If your setup needs admin rights, you will have already checked the "admin" check-box in InstallAware.

On older operating systems, users will get a standard admin prompt if they are not admins. So setup won't continue.

On Vista, if the user is an admin, they will get a UAC dialog for elevation, after the prompt has been put into place.

On Vista, if the user is not an admin, they will not get a UAC dialog, and setup will fail with the admin check step also; since the user is not an admin.

So this actually works even better by eliminating unneeded admin prompts!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 212 guests