locked
MSIEXEC cannot install for all users RRS feed

  • Question

  • Hi,

    I am trying to install a msi setup file on a remote machine. In this environment the "msiexec" command is called by a java based program on that target machine.

    The target machine (Windows 7) user is logged in and should have local administrative rights (but I am not entirely sure of that, since I do not have direct access to the machine). UAC is turned off.

    I am executing the following command to try and install the software:

    msiexec /i Setup.msi /qn /l* Installog\setup.log BUTTON2=2 TARGETDIR="\\UNC\Style\Path"

    But the installation always fails with the following (from the log):

    Error 1925. You do not have sufficient privileges to complete this installation for all users of the machine. 
    Log on as administrator and then retry this installation.
    Action ended 19:09:57: InstallExecute. Return value 3.

    I actually do not want to install it for all users, just for the current one!

    I already tried specifying ALLUSERS=1 and ALLUSERS=2, but both had no effect on the produced log message. Also I successfully have this running on another machine where I definitely have local administrative rights, I am unfortunately not able to test on another pc where I do not have these rights to see how that would behave.

    The setup is deploying files to these directories

    C:\Program Files\<Company>\<Product>
    C:\Users\<CurrentUser>\AppData\Roaming\<Company>\<Product>

    I hope someone can help, I would appreciate it.

     




    • Edited by ns_gds Wednesday, March 23, 2011 5:52 PM Removed trailing quote
    Wednesday, March 23, 2011 5:50 PM

Answers

  • Hi,

    thanks for your replies. I found out that the user on the remote machine indeed has local administrator rights. I should also note that the UAC on the target machine is turned off.

    This is what we did next to get to a solution.

    I finally got access to the machine and we tried around a bit with running the setup in normal UI mode and from command line in silent mode. When executing in UI mode and installing for all users we noticed that the UAC rights elevation request was triggered on install. The installation succeeded because the request was "automatically" approved. When we tried running it from the command line with the /qn option and again for all users the installation failed because of insufficient rights, then we executed the same command in a cmd-shell that we started with "run as administrator" and the installation succeeded again.

    We were unsure why this was happening but since it worked with the UI we tried the command line option /qb (show the progressbar but nothing else) and the UAC rights elevation happened again and the installation succeeded.

    Since I do not care if the progress bar is visible or not and I do not have the means of running the installation in a administrator shell I am sufficiently pleased with this solution.

    Regards,

    ns_gds

    • Marked as answer by ns_gds Monday, March 28, 2011 1:22 PM
    Monday, March 28, 2011 1:22 PM

All replies

  • Ok I seem to have found the solution for this.

    The link below explains it well enough.

    http://msdn.microsoft.com/en-us/library/aa367559%28v=vs.85%29.aspx

    But I am running into another problem now

    Error 1935. An error occurred during the installation of assembly 'Microsoft.VC90.MFC,version="9.0.30729.1",
    publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="x86",type="win32"'.
    Please refer to Help and Support for more information.
    HRESULT: 0x80070005. assembly interface: IAssemblyCache, function: CreateAssemblyCacheItem,
    component: {CB438DD9-2B1B-32E0-9AA6-D6DA82CE9D97}

    I found the (hopefully) related error description

    http://support.microsoft.com/kb/970652

    and how to fix it

    http://support.microsoft.com/default.aspx?scid=kb;en-us;946414

    Since I do not have direct access to the machine it will however be messy to follow the mentioned steps and I am not entirely convinced that this is the solution.


    Thursday, March 24, 2011 6:07 AM
  • The HRESULT indicates "access denied". I will need to see why this happens.
    Thursday, March 24, 2011 3:42 PM
  • Make that logging option:

     /l*v Installog\setup.log

    and post the log somewhere for people to look at.


    Phil Wilson
    Thursday, March 24, 2011 4:48 PM
  • Hi,

    thanks for your reply.

    Can you upload files in this forum? I could not post the text here, it is probably to long. I posted it to codeviewer below.

    http://codeviewer.org/view/code:18b1

    Regards,

    ns_gds

    Friday, March 25, 2011 4:12 PM
  • The VC runtime cannot be installed in a per-user install. It requires ALLUSERS to be 1.  I assume that's because installing the C++ Dlls must be for the system and per-user is not supported.
    Phil Wilson
    • Proposed as answer by Mike Dos Zhang Monday, March 28, 2011 11:17 AM
    Friday, March 25, 2011 7:31 PM
  • Hi ns_gds,

    If you can install the setup package in the system manually using the Administrator account, then I think this is a permission problem when you start the install command from remote machine.

    And you also can try to start the "Windows Modules Installer" service before you install this package.

     

    If there's any concern, please feel free to let us know.

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 28, 2011 11:43 AM
  • Hi,

    thanks for your replies. I found out that the user on the remote machine indeed has local administrator rights. I should also note that the UAC on the target machine is turned off.

    This is what we did next to get to a solution.

    I finally got access to the machine and we tried around a bit with running the setup in normal UI mode and from command line in silent mode. When executing in UI mode and installing for all users we noticed that the UAC rights elevation request was triggered on install. The installation succeeded because the request was "automatically" approved. When we tried running it from the command line with the /qn option and again for all users the installation failed because of insufficient rights, then we executed the same command in a cmd-shell that we started with "run as administrator" and the installation succeeded again.

    We were unsure why this was happening but since it worked with the UI we tried the command line option /qb (show the progressbar but nothing else) and the UAC rights elevation happened again and the installation succeeded.

    Since I do not care if the progress bar is visible or not and I do not have the means of running the installation in a administrator shell I am sufficiently pleased with this solution.

    Regards,

    ns_gds

    • Marked as answer by ns_gds Monday, March 28, 2011 1:22 PM
    Monday, March 28, 2011 1:22 PM
  • It is happening for the reason I described, and your solution works because it causes the setup to run in 'Everyone' mode for all users of the system, as required by the VC++ merge modules.

    Visual Studio setups use ALLUSERS=2 when you run the install. Unfortunately this behavior reverts to a per-user install if the user is nor admin, causing the error you see.

    http://msdn.microsoft.com/en-us/library/aa367559(v=vs.85).aspx 


    Phil Wilson
    Tuesday, March 29, 2011 8:45 PM