Contents
- Package definition
- Package structure
- Package internal information
- Merge Module
- Files
- Registries
- INI Files
- Shortcuts
- Fonts
- Services
- ODBC (Open DataBase Connectivity)
- System variables
- Properties
- Running custom code from the package
- Custom Actions
- System Search
- Upgrades
- Patching
- Upgrading
- De-hardcoding and Variabilization
- De-hardcoding
- Variabilization
- Vendor MSI
- Definition
- Seller Vendor Customization
- Direct vendor MSI
- Vendor MSI hidden in setup
- Vendor MSI with patch
- Modify an MSI vendor, from cab outside to cab inside, etc.
- Msiexec.exe commands
- Installing a package
- Repairing a package
- Uninstalling a package
- Administrative Installation
- Creating logs
- Applying a patch over a MSI
- Installation with MST
- Active-Setup Mechanism
Msiexec.exe commands
The executable behind the Windows Installer is msiexec.exe. This file is located in C:\WINDOWS\system32 and can be used to control or repair the installation and uninstallation of packages in the command line.
Installing a package
The argument for installing a package is Argument: /i
Command: msiexec /i Package.msi
Repairing a package
Argument: /f - is the argument for repairing a package.
Command: msiexec /f {ProductCode}
Uninstalling a package
Argument: /x - is the argument for uninstalling a package.
Command: msiexec /x {ProductCode}
Administrative Installation
Argument: /a - is the argument for performing an administration installation of a package.
Command: msiexec /a Package.msi TARGETDIR=”C:\temp\yourdesireddrirectory”
Creating logs
Argument: /l - is the argument for making a log.
Command:
- msiexec /i Package.msi /l LogFile.log - log on installation
- msiexec /f {ProductCode} /l LogFile.log - log on repair
- msiexec /x {ProductCode} /l LogFile.log - log when uninstalling
OBS: Arguments are commutative, with the specification that after each argument, the corresponding information is passed (after an /i an MSI should be passed, after an /l a log file (.log) should be passed).
Applying a patch over a MSI
Argument: /p - is the argument for installing a patch over an MSI.
Command: msiexec /p Patch.msp - the command to install an MSP
The command can also be parsed together with an MSI:
Command: msiexec /i Package.MSI /p Patch.msp
Installation with MST
Command: msiexec /I Package.msi TRANSFORMS = Transform.mst
Check out more options and documentation regarding msiexec commands here.