Install msi with msiexec in a Specific Directory

后端 未结 13 2344
独厮守ぢ
独厮守ぢ 2020-12-01 04:15

I want to install a msi with msiexec in a specific directory. I\'m using:

msiexec /i \"msi path\" INSTALLDIR=\"C:\\myfolder\" /qb

It is no

相关标签:
13条回答
  • 2020-12-01 04:41

    InstallShield 12

    INSTALLDIR represents the main product installation directory for a regular Windows Installer–based (or InstallScript MSI) installation, such as the end user launching Setup.exe or your .msi database.

    TARGETDIR represents the installation directory for an InstallScript installation, or for an administrative Windows Installer based installation (when the user runs Setup.exe or MsiExec.exe with the /a command-line switch).

    In an InstallScript MSI project, the InstallScript variable MSI_TARGETDIR stores the target of an administrative installation.

    Source: INSTALLDIR vs. TARGETDIR

    0 讨论(0)
  • 2020-12-01 04:41

    Use APPLICATIONFOLDER="path" for latest msiexec

    0 讨论(0)
  • 2020-12-01 04:43

    Use INSTALLLOCATION. When you have problems, use the /lv log.txt to dump verbose logs. The logs would tell you if there is a property change that would override your own options. If you already installed the product, then a second run might just update it without changing the install location. You will have to uninstall first (use the /x option).

    0 讨论(0)
  • 2020-12-01 04:47

    Here's my attempt to install .msi using msiexec in Administrative PowerShell.

    I've made it 7 times for each of 2 drives, C: and D: (14 total) with different arguments in place of ARG and the same desirable path value.

    Template: PS C:\WINDOWS\system32> msiexec /a D:\users\username\downloads\soft\publisher\softwarename\software.msi /passive ARG="D:\Soft\publisher\softwarename"

    ARGs:

    • TARGETDIR
      • Works OK-ish, but produces redundand ProgramFilesFolder (with an additional folders similar to the default installation path, e.g. D:\Soft\BlenderFoundation\Blender\ProgramFilesFolder\Blender Foundation\Blender\2.81\) and a copy of the .msi at the target folder.
    • INSTALLDIR, INSTALLPATH, INSTALLFOLDER, INSTALLLOCATION, APPLICATIONFOLDER, APPDIR
      • When running on the same drive as set in the parameter: installs on this drive in a default folder (e.g. D:\Blender Foundation\Blender\2.81\)
      • When running from a differnet drive: seems to do nothing
    0 讨论(0)
  • 2020-12-01 04:52

    This should work:

    msiexec /i "msi path" TARGETDIR="C:\myfolder" /qb
    
    0 讨论(0)
  • 2020-12-01 04:53
    msiexec /i "msi path" INSTALLDIR="C:\myfolder" /q
    

    Only this variant worked well.

    0 讨论(0)
提交回复
热议问题