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
- :
- Making an MSI Require Administrator rights
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
‎Apr 27, 2011
07:55 AM
Making an MSI Require Administrator rights
Folks,
First of all, this question has nothing to do with InstallShield - in fact, for various reasons, IS is explicitly excluded (for now). The Devp team I work for produces MSIs directly out of MS VisualStudio 2010. The target systems are Window2008R2 exclusively, so we are only dealing with MSI v5.0.
We would like to make these MSIs require that the person running the install be a member of the Administrator's group, and if not, gracefully exit the installer with a pleasant message. If the person is an Administrator, depending on how the target system is configured, he may still be challenged by UAC for either approval or credentials, either of which is ok. What I want to avoid is allowing the install to proceed if the person is not an Administrator.
Oh, and doing so in the launcher (setup.exe), or by a command-line switch, is also excluded (again, for now).
Lots of MSDN literature discusses what an Administrator can do to manage UAC and MSIs; very little seems to address this question: how does an installation author REQUIRE administrative rights?
Any thoughts, suggestions, links?
Thanks and Regards,
First of all, this question has nothing to do with InstallShield - in fact, for various reasons, IS is explicitly excluded (for now). The Devp team I work for produces MSIs directly out of MS VisualStudio 2010. The target systems are Window2008R2 exclusively, so we are only dealing with MSI v5.0.
We would like to make these MSIs require that the person running the install be a member of the Administrator's group, and if not, gracefully exit the installer with a pleasant message. If the person is an Administrator, depending on how the target system is configured, he may still be challenged by UAC for either approval or credentials, either of which is ok. What I want to avoid is allowing the install to proceed if the person is not an Administrator.
Oh, and doing so in the launcher (setup.exe), or by a command-line switch, is also excluded (again, for now).
Lots of MSDN literature discusses what an Administrator can do to manage UAC and MSIs; very little seems to address this question: how does an installation author REQUIRE administrative rights?
Any thoughts, suggestions, links?
Thanks and Regards,
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2011
05:06 PM
In an MSI you can have a PROPERTY actually contain VBScript. This VBScript can then of course check the logged on user and see if they are a member of the Local Admin Group. You can then create a Launch Condition for the MSI and have your Launch Condition call the PROPERTY that holds your VBScript.
Give that a try and let us know.
Give that a try and let us know.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2011
05:20 PM
Out of curiosity... how do you do that?
hh1234 wrote:
have your Launch Condition call the PROPERTY that holds your VBScript.