Skip to content

All About MSIEXEC Windows command

The Windows msiexec command is a powerful tool used for installing, uninstalling, and configuring Windows Installer packages. It offers various options and parameters for customizing the installation process. By running msiexec from the command prompt, users can manage software installations, repairs, and updates efficiently. Understanding how to use msiexec effectively can streamline software deployment and maintenance tasks, making it an essential tool for system administrators and IT professionals.

Terminal window
msiexec [option] [parameter]
OptionDescription
/iInstall or configure a product
/xUninstall a product
/qnQuiet mode with no user interaction
/lEnable logging
/quietQuiet mode with user interaction
ParameterDescription
PackageSpecifies the path to the Windows Installer package (.msi file)
ProductCodeSpecifies the unique identifier for the product
LogFileSpecifies the path to the log file for logging installation messages
Terminal window
msiexec /i "C:\example.msi"

Installs the MSI package located at “C:\example.msi”.

Terminal window
msiexec /x {ProductCode}

Uninstalls the MSI package specified by its Product Code.

Terminal window
msiexec /i "C:\example.msi" /l*v "C:\install.log"

Installs the MSI package with detailed logging to the specified log file.

Terminal window
msiexec /fa {ProductCode}

Repairs the MSI installation specified by its Product Code.

Terminal window
msiexec /i "C:\example.msi" PROP1=Value1 PROP2=Value2

Installs the MSI package and sets property values during installation.

Terminal window
msiexec /a "C:\example.msi" /qb TARGETDIR="C:\extracted_files"

Extracts files from the MSI package to the specified target directory.

To use the msiexec command in Windows, execute the following command:

Terminal window
msiexec --option <value>

How can I install an MSI package using msiexec?

Section titled “How can I install an MSI package using msiexec?”

To install an MSI package using msiexec, use the following command:

Terminal window
msiexec /i "C:\path\to\package.msi"

How can I uninstall an MSI package using msiexec?

Section titled “How can I uninstall an MSI package using msiexec?”

To uninstall an MSI package using msiexec, use the following command:

Terminal window
msiexec /x {ProductCode}

How do I repair an MSI package using msiexec?

Section titled “How do I repair an MSI package using msiexec?”

To repair an MSI package using msiexec, use the following command:

Terminal window
msiexec /f {ProductCode}

How do I extract files from an MSI package using msiexec?

Section titled “How do I extract files from an MSI package using msiexec?”

To extract files from an MSI package using msiexec, use the following command:

Terminal window
msiexec /a "C:\path\to\package.msi" /qb TARGETDIR="C:\path\to\target\folder"

How can I set a property when installing an MSI package using msiexec?

Section titled “How can I set a property when installing an MSI package using msiexec?”

To set a property when installing an MSI package using msiexec, use the following command:

Terminal window
msiexec /i "C:\path\to\package.msi" PROPERTY=PropertyValue

How can I log the installation process with msiexec?

Section titled “How can I log the installation process with msiexec?”

To log the installation process with msiexec, use the following command:

Terminal window
msiexec /i "C:\path\to\package.msi" /l*v "C:\path\to\logfile.log"

How do I suppress the reboot prompt during an MSI package installation using msiexec?

Section titled “How do I suppress the reboot prompt during an MSI package installation using msiexec?”

To suppress the reboot prompt during an MSI package installation using msiexec, use the following command:

Terminal window
msiexec /i "C:\path\to\package.msi" REBOOT=ReallySuppress
  • Installing or uninstalling Windows Installer packages
  • Repairing installations
  • Applying patches
  • Administrative installations
  • Configuring Windows Installer settings
  • Logging installation activities
  • Unattended installations