This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to let msi file Require Administrative Privileges
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 22, 2008
01:45 PM
How to let msi file Require Administrative Privileges
I built a basic msi project with installshield2008. My install package has both a setup.exe and msi file. I wanna force user giving administrative privileges when my package is installing to Vista.
I set the option "Require Administrative Privileges" to "Yes", therefore, when user dobule clicks setup.exe, Vista UAC will force he give the installation adiminstrative privileges, otherwise the installation will be quited. But the problem is if user double-click msi, msiexec will execute automatically, therefore, I have no chance to give the installation admin privilege.
Anyone know how to let msi require admin privilege in vista? I think maybe I should modify some sittings of msi file.
Thanks!
I set the option "Require Administrative Privileges" to "Yes", therefore, when user dobule clicks setup.exe, Vista UAC will force he give the installation adiminstrative privileges, otherwise the installation will be quited. But the problem is if user double-click msi, msiexec will execute automatically, therefore, I have no chance to give the installation admin privilege.
Anyone know how to let msi require admin privilege in vista? I think maybe I should modify some sittings of msi file.
Thanks!
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 22, 2008
03:34 PM
Hi,
Windows Installer by default doesn't elevate to higher privileges until it is about to actually start doing work in the install sequence. Hence your setup will prompt for RunAs dialog if the msi need admin rights to be installed.
Or, you can wrap the msi into Exe so that user have no choice but to execute the exe.
Windows Installer by default doesn't elevate to higher privileges until it is about to actually start doing work in the install sequence. Hence your setup will prompt for RunAs dialog if the msi need admin rights to be installed.
Or, you can wrap the msi into Exe so that user have no choice but to execute the exe.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 22, 2008
04:27 PM
Hi Happy Days,
Thanks for reply. But I need leave msi out, since users will use it depoly by active dircectory.
Can I do sth that let msi prompt out a RunAs dilog just like setup.exe did while installing?
Thanks!
Thanks for reply. But I need leave msi out, since users will use it depoly by active dircectory.
Can I do sth that let msi prompt out a RunAs dilog just like setup.exe did while installing?
Thanks!
Happy Days wrote:
Hi,
Windows Installer by default doesn't elevate to higher privileges until it is about to actually start doing work in the install sequence. Hence your setup will prompt for RunAs dialog if the msi need admin rights to be installed.
Or, you can wrap the msi into Exe so that user have no choice but to execute the exe.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 22, 2008
04:36 PM
You can write a vbscript custom action which checks for AdminUser MSI property and sequence it right on top. If you are not sure how to do it, please refer Session object in Windows Installer help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 22, 2008
05:17 PM
You might look into the AdminUser, Privileged, and possibly MSIUSEREALADMINDETECTION properties...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 23, 2008
10:23 AM
Robert's suggestion should allow you to abort the install when it's not elevated; another option would be to document use of the setup.exe /a parameter to create an administrative installation point, potentially enabling Happy's suggestion. The two suggestions can be used together as well for further safety.
But ideally I would suggest removing the requirement for administrator privileges outside of the Deferred portion of the Execute sequence, as it makes for a cleaner install.
But ideally I would suggest removing the requirement for administrator privileges outside of the Deferred portion of the Execute sequence, as it makes for a cleaner install.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 23, 2008
01:04 PM
Thanks for all replies!
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)