10

Normally you can right-click an executable and select "Run As" and away you go, but it doesn't seem to work for .msi files.

ninesided
  • 499
  • 2
  • 7
  • 9

5 Answers5

11

You shouldn't have to start MSI's with elevated privileges if you're already logged-on with an Administrator account. The Windows Installer service will elevate automatically (and prompt you w/ UAC, if your OS is configured to do so).

If you're not logged-on as an Administator, you'll want to do:

runas /user:<administrator username here> "msiexec /i <Path and Filename of MSI"

That will start an installation.

You could also just open an elevated command prompt, go to the directory where the MSI is sitting, and key in the MSI's name at the command prompt (with the .MSI extension). That will also start an installation.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
4

Or use the GPO setting "Always Install with Elevated Privileges" in Admin Templates/Windows Components/Windows Installer.

Maximus Minimus
  • 8,937
  • 1
  • 22
  • 36
3

Another option is to add a registry key in XP:

Edit the key

HKey_Classes_Root\Msi.Package\shell\runas

and set the value to:

Install &as...

Create the following key:

HKey_Classes_Root\Msi.Package\shell\runas\command

and set it to

msiexec /i "%1"

Then right-click the MSI and there you go. I wouldn't suggest this method unless this is something you do all the time though.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
1

The registry hack, I created a tiny windows application to do it. Download a copy here - https://runasadminmsiexttink.codeplex.com and run the application to enable/disable Run as Administrator context menu option for .MSI files.

gmaran23
  • 329
  • 2
  • 6
  • 13
1

One of the main features of MSI is that users are to be able to run with temporary "elevated rights". This means that users can install MSI files advertised to them, and the MSI will have elevated rights (similar but not identical to admin rights) for the duration of the install.

This elevation is enabled either by group policy as stated above, or by a registry setting. Obviously go for the policy approach if you can.

Stein Åsmul
  • 2,566
  • 4
  • 25
  • 38