cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Scott_Mayham
Level 3

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,
Labels (1)
0 Kudos
(3) Replies
TsungH
Level 12

It is usually done in LaunchCondition table, using either Privileged or AdminUser property.
0 Kudos
hh1234
Level 5

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.
0 Kudos
TsungH
Level 12

Out of curiosity... how do you do that?
hh1234 wrote:
have your Launch Condition call the PROPERTY that holds your VBScript.
0 Kudos