InstallShield DevStudio
Please participate in a brief survey to help InstallShield improve this topic.
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.
To ensure that Windows Installer is installed on a target system, InstallShield DevStudio creates a Setup.exe for your application by default. Setup.exe can install Windows Installer if it is not present on the target system, or upgrade an older version.
Your Windows Installer package can be accessed from C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\<project name>\<product configuration>\<release name>\DiskImages\Disk1\<product name.msi>.
After building a release of your product, you can install it from the command line:
msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\<project name>\
<product configuration>\<release name>\DiskImages\Disk1\<product name>.msi"
The table below provides a detailed description of MsiExec.exe command line parameters.
| Parameter | Description |
|---|---|
| /i <package> or <product code> | Use this format to install the product Othello: msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Othello\Trial Version\Release\DiskImages\Disk1\Othello Beta.msi" Product Code refers to the GUID that is automatically generated in the Product Code property of your product's project view. |
| /f [p|o|e|d|c|a|u|m|s|v] <package> or <product code> | Installing with the /f option will repair or reinstall missing or corrupted files. For example, to force a reinstall of all files, use the following syntax: msiexec /fa "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Othello\Trial Version\Release\DiskImages\Disk1\Othello Beta.msi" in conjunction with the following flags:
|
| /a <package> | The /a option allows users with administrator privileges to install a product onto the network. |
| /x <package> or <product code> | The /x option uninstalls a product. |
| /j [u|m] <package> /j [u|m] <package> /t <transform list> /j [u|m] <package> /g /j <language ID> |
Building with the /j <package> option advertises the components of your application on the end user's computer
|
| /L [i|w|e|a|r|u|c|m|p|v|+] <log file> | Building with the /L option specifies the path to the log file—these flags indicate which information to record in the log file:
|
| /p <patch package> | Building with the /p option applies a patch to an installed setup package. To patch an installed administrative image, combine this option with /a as shown: /p <patch package> /a <package> |
| /q [n|b|r|f] | The /q option is used to set the user interface level in conjunction with the following flags:
|
| /? or /h | Either command displays Windows Installer copyright information |
| /y <filename> | This command calls the DllRegisterServer entry-point function of the DLL or OCX file specified in <filename>. |
| /z <filename> | This command calls the DllUnregisterServer entry-point function of the DLL or OCX file specified in <filename>. |
| TRANSFORMS | Use the TRANSFORMS command line parameter to specify any transforms that you would like applied to your base package. Your transform command line call might look something like this: msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Your Project Name\Trial Version\My Release-1\DiskImages\Disk1\ProductName.msi" TRANSFORMS="New Transform 1.mst" You can separate multiple transforms with a semicolon. Because of this, it is recommended that you do not use semicolons in the name of your transform, as the Windows Installer service will interpret those incorrectly. |
| Properties | All public properties can be set or modified from the command line. Public properties are distinguished from private properties by the fact that they are in all capital letters. For example, COMPANYNAME is a public property. To set a property from the command line, use the following syntax: PROPERTY=VALUE. If you wanted to change the value of COMPANYNAME, you would enter: msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Your Project Name\Trial Version\My Release-1\DiskImages\Disk1\ProductName.msi" COMPANYNAME="InstallShield" |
See Also
For information on passing MsiExec.exe command line parameters through Setup.exe, see Setup.exe Command Line Parameters.