Msiexec

install

msiexec /I e.msi INSTALLLOCATION=C:\eaf /qn 

Install Options

When launching an installation package, you can set the install type through these options:

msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] <path_to_package>

  • /i - normal installation
  • /a - administrative install
  • /j - advertise the product u - advertise to the current user
  • m - advertise to all users
  • /g - the language identifier used by the advertised package
  • /t - apply transform to advertise package
  • /x - uninstall the package

logging options

Display Options

The user interface level of the installation can be configured according to the target environment. For example, a package distributed to clients should have a full UI, while a package deployed through Group Policy should have no user interface. Msiexec.exe sets the UI level of the installation through these options:

msiexec.exe /i <path_to_package> [/quiet][/passive][/q{n|b|r|f}]
  • /quiet - quiet mode (there is no user interaction)
  • /passive - unattended mode (the installation shows only a progress bar)
  • /q - set the UI level: n - no UI
  • n+ - no UI except for a modal dialog box displayed at the end.
  • b - basic UI
  • b+ - basic UI with a modal dialog box displayed at the end. The modal box is not displayed if the user cancels the installation. Use qb+! or qb!+ to hide the [ Cancel ] button.
  • b- - basic UI with no modal dialog boxes. Please note that /qb+- is not a supported UI level. Use qb-! or qb!- to hide the [ Cancel ] button.
  • r - reduced UI
  • f - full UI

Example to output the result of install to log file

The following will run the installer (with any graphical interface presented) with output to logfile

msiexec /i "myinstallerfile.msi" /l*v "Mylogfilename.log"

Note: " needed if whitespace


repair

msiexec /fasum {9935F97F-D806-4049-B9B8-17641C3A715F}

Repair Options

If you have an installed package, you can use the Windows Installer command line for repairing it:

msiexec.exe [/f{p|o|e|d|c|a|u|m|s|v}] <product_code>

  • /f - repair a package p - repair only if a file is missing
  • o - repair if a file is missing or an older version is installed
  • e - repair if file is missing or an equal or older version is installed
  • d - repair if a file is missing or a different version is installed
  • c - repair if a file is missing or the checksum does not match the calculated value
  • a - forces all files to be reinstalled
  • u - repair all the required user-specific registry entries
  • m - repair all the required computer-specific registry entries
  • s - repair all existing shortcuts
  • v - run from source and recache the local package