Command line

Run msiexec for a silent install, a silent uninstall and a verbose log

The msiexec command lines for a silent MSI install, a silent uninstall, a repair and a verbose log file for troubleshooting.

LanguageBatch
What it does to the systemMakes changes. Test it on one computer first.

These are the msiexec command lines you need for an SCCM application or package. They install and remove an MSI with no prompts.

Add the verbose log to every command. It is the first place to look when an install fails with 1603.

Batch
rem Silent install, no restart, verbose log.
msiexec /i "setup.msi" /qn /norestart /l*v "C:\Windows\Temp\setup-install.log"

rem Silent install with a transform file and a public property.
msiexec /i "setup.msi" TRANSFORMS="custom.mst" ALLUSERS=1 /qn /norestart /l*v "C:\Windows\Temp\setup-install.log"

rem Silent uninstall by MSI file.
msiexec /x "setup.msi" /qn /norestart /l*v "C:\Windows\Temp\setup-uninstall.log"

rem Silent uninstall by product code. Use your own product code.
msiexec /x {11111111-2222-3333-4444-555555555555} /qn /norestart /l*v "C:\Windows\Temp\setup-uninstall.log"

rem Silent repair of an installed product.
msiexec /fa "setup.msi" /qn /norestart /l*v "C:\Windows\Temp\setup-repair.log"

rem Apply a patch file silently.
msiexec /p "update.msp" /qn /norestart /l*v "C:\Windows\Temp\setup-patch.log"

How to use it

  1. Change setup.msi to your MSI file name and set your own log path.
  2. Test the command in a Command Prompt that runs as administrator.
  3. Paste the working command into the install or uninstall program of your SCCM deployment type.
  4. If it fails, open the log and search for value 3. The cause is in the lines above it.

Good to know

  • Exit code 0 means success. 3010 means success and a restart is needed. 1641 means the installer started a restart.
  • /qn shows nothing. Use /qb for a progress bar when you test by hand.
  • Without /norestart an MSI can restart the computer with no warning.
msiexec MSI silent install uninstall verbose log
✉

Get new articles in your inbox

SCCM guides, AI tools, automation tips — sent when published. No spam.