Installing MSI Packages from Command Line
Although a MSI file can be installed by double clicking on it in Explorer or by selecting install from the context menu, you might want to start from command line to include it in a script. This can be done by using the
msiexec.exe utility. Although its parameters are well documented I had to do some searching to find a way for setting a different installation directory than the default one in case the configuration forms are skipped with the
/qb option. It can be done by setting the
INSTALLDIR property to the desired value.
As a future reference the following command line triggers the setup package to install into the specified directory without opening any additional configuration windows:
msiexec /i MyMSI.msi /qb INSTALLDIR="C:\Program Files\My Install Dir"