none
Why as an admin can I not install a .msi package on Windows Server 2008 R2?

    Question

  • I am an Active Directory user that is in the 'Administrators' group on a Windows Server 2008 R2 server we have.  When I attempt to install any setup packages I deploy to the server that are .msi packages, I receive the following error:

    "You do not have sufficient privileges to complete the installation for all users of the machine. Log on as administrator and then retry the installation."

    The thing is I am an Administrator.  Is the 'local' administrator account the only account allowed to install .msi packages?  I talked to my server admin and they didn't know why this is occuring since we just started using 2008 R2.  If it was a configuration he would be happy to change it so users in the 'Administrators' group can install .msi packages. I can install .exe packages, but for this setup package I only have the .msi file.

    Anyone know how to fix this or update the configuration?

    Wednesday, October 06, 2010 1:43 PM

Answers

  • One suggestion would be to start a command prompt (cmd.exe) using "Run as administrator", then use a command similar to:

    msiexec /a MySetup.msi

    There are probably other ways as well.

    Richard Mueller


    MVP ADSI
    • Marked as answer by atconway Wednesday, October 06, 2010 7:49 PM
    Wednesday, October 06, 2010 5:58 PM

All replies

  • check if you have uac on. (msconfig --> launch user access control something), turning it off will "fix" the issue. one can argue about uac on a server, though if you decide to turn it off you might want to read up on it so you know what security you turned off (http://technet.microsoft.com/en-us/library/dd446675(WS.10).aspx)

    alternative shift rightclick the msi file, it should offer something like "run as administrator"

    Wednesday, October 06, 2010 2:08 PM
  • Thanks for the quick response.  I tried SHIFT + right-click (thanks for the tip by the way) and chose a different domain admin user account to install the .msi and it did not work.  I received the same message. The problem is I am already in the Administrators group on the box, so choosing a different admin made sense that nothing changed.

    I also tried reducing UAC settings to "Never Notify" (lowest level) of changes and that did not work either.

    I don't think this is a UAC error message as the error message I presented doesn't have that same 'UAC' alert notification look and feel.  This is just a message box that pops up on top of the installer with that message.

    Any other ideas?

    • Edited by atconway Wednesday, October 06, 2010 5:53 PM
    Wednesday, October 06, 2010 3:28 PM
  • If you are logged on with an account that is a member of the local Administrators group (or a member of "Domain Admins", which is also a member of the local Administrators group), then right click the setup program and select "Run as administrator". The program will run with your credentials. If it still fails, then permissions are not the problem. If you don't use "Run as administrator", the program does NOT run with your credentials (if UAC is enabled).

    Richard Mueller


    MVP ADSI
    Wednesday, October 06, 2010 4:14 PM
  • Richard - thank you for the quick response.  The "Run as Administrator" option is not available for .msi packages.  It is available for .exe packages and that is exactly how I initiate the install.

    When I right-click the .msi there is no "Run As Administartor" option.  Is this configurable, or do you have any other ideas?

    Thank you,

    Wednesday, October 06, 2010 5:41 PM
  • One suggestion would be to start a command prompt (cmd.exe) using "Run as administrator", then use a command similar to:

    msiexec /a MySetup.msi

    There are probably other ways as well.

    Richard Mueller


    MVP ADSI
    • Marked as answer by atconway Wednesday, October 06, 2010 7:49 PM
    Wednesday, October 06, 2010 5:58 PM
  • Richard - that workaround seemed to work well and I was able to install the package.  Thank you very much.  If you or anyone ever comes across a permanent configuration solution to allow admins the ability directly to install .msi packages on Server 2008 R2, please post back.  For now, the solution you posted works well.

    Thank you,

    Wednesday, October 06, 2010 7:49 PM
  • An alternate solution is to add a context menu option for .msi files to allow you to install them with administrator privileges (I don't know why MS didn't include this be default) Copy the following 5 lines into a text file and save with the extension .reg, then double-click to import into the registry. After you do this, you can right click any .msi file and choose the option "Install As Administrator":

     

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Msi.Package\shell\runas]
    @="Install &As Administrator..."
    
    [HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
    @="msiexec /i \"%1\""

     

    • Proposed as answer by Meyercord Tuesday, July 12, 2011 2:31 PM
    Tuesday, July 12, 2011 2:29 PM
  • Install it from Local Admin
    Tuesday, July 26, 2011 11:36 AM
  • An administrator install of an msi package uses /a, not /i:

    [HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
    @="msiexec /a \"%1\""

    Friday, July 19, 2013 6:26 PM
  • Thanks guy, kinda solved my issue.

    Manage to have the run as Admin.

    But is there another solution which would make it install without right clicking.

    Thanks, in advance

    Tuesday, July 23, 2013 1:22 PM
  • Thanks guy, kinda solved my issue.

    Manage to have the run as Admin.

    But is there another solution which would make it install without right clicking.

    Thanks, in advance

    Hi...

    I think what you're looking for is this:

    Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value "0"

    Copy and paste into powershell (run powershell as admin). You'll need to reboot afterward, but it worked for me. No longer having to run stuff from cmd prompt and no longer having to open notepad as admin to save text files! 

    Friday, December 06, 2013 3:29 PM
  • Wow, that's amazing.

    One of our customers has a 2011 SBS Premium, and since last December any and all Windows Updates failed, and any and all .msi packages could not be installed / uninstalled ("Windows Installer error - This installation package could not be opened")

    I tried everything, including msiexec /a and nothing worked.

    Now I turned of UAC, and immediately everything works. 

    Thanks! :)

    Tuesday, February 11, 2014 5:38 PM