I want to install an MSI file with msiexec into a specific directory. I am using:
msiexec /i "msi path" INSTALLDIR="C:\myfolder" /qb
Using "INSTALLDIR" is not working properly because the MSI is installed into the default path and not into the specified path.
When ThinApp installs the MSI package for individual users, the default MSI installation directory is %AppData%\<inventory_name> (VMware ThinApp). You can override the default installation directory by using an INSTALLDIR property in the msiexec command.
MsiExec.exe is the executable program of the Windows Installer used to interpret installation packages and install products on target systems. After you build your release, you can install your Windows Installer package (. msi) from the command line.
In order to create MSI package from your project, navigate to the Package -> MSI tab, update Application Details like name, publisher, version and click Build MSI. Click Go to…, located next to the MSI file name field, to open the package containing folder in Windows Explorer.
Use TARGETDIR instead of INSTALLDIR. Note that the quote marks for TARGETDIR property are only around the path in the case of spaces.
msiexec /i "msi path" TARGETDIR="C:\myfolder" /qb
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With