Silent install switches for MSI, Inno Setup, NSIS and other Windows installers

The exact command to install a Windows app with no wizard and no prompts, for every common installer type. Each section has the install command, how to stop a restart, how to write a log, how to set the folder, and the silent uninstall.

A brass bell wrapped in cloth and tied with string

A silent install runs an installer with no wizard, no prompts and no clicks. You need one when you deploy an app to many computers, script a build machine, or update an app in the background.

There's no single switch, because it depends on the tool the installer was built with. An .msi takes /qn. A setup.exe made with Inno Setup takes /VERYSILENT. One made with NSIS takes /S. This page lists them all, each checked against the tool's own documentation or source code on November 26, 2026.

Silent install switches at a glance

Installer type Silent install command
MSI (Windows Installer) msiexec /i app.msi /qn /norestart
Inno Setup setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
NSIS setup.exe /S
InstallShield, Basic MSI Setup.exe /s /v/qn
InstallShield, InstallScript Setup.exe /s /f1"C:\Temp\Setup.iss"
WiX bundle (Burn) bundle.exe /quiet /norestart
Velopack MyApp-Setup.exe --silent
MSIX Add-AppxPackage -Path .\MyApp.msix
winget winget install --id Publisher.App --silent

And the rest of what you usually need:

Installer type Log file Install folder Silent uninstall
MSI /l*v install.log A property the package defines msiexec /x app.msi /qn /norestart
Inno Setup /LOG="install.log" /DIR="C:\Apps\MyApp" unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
NSIS Up to the script /D=C:\Apps\MyApp, last and unquoted uninstall.exe /S
InstallShield, Basic MSI /v"/l*v c:\test.log" /v"/qn INSTALLDIR=D:\Destination" msiexec /x {ProductCode} /qn /norestart
WiX bundle /log log.txt Up to the bundle bundle.exe /uninstall /quiet /norestart
Velopack --log install.log --installto C:\Apps\MyApp Update.exe uninstall --silent
winget --log install.log --location C:\Apps\MyApp, if supported winget uninstall --id Publisher.App --silent

If you don't know which type you have, the section "How to tell which installer you have" further down shows how to find out.

MSI: msiexec silent install

An .msi file isn't a program. Windows Installer runs it, through msiexec.exe.

msiexec /i "C:\example.msi" /qn /norestart
Switch What it does
/i Installs the package
/qn No user interface at all
/quiet The same as /qn. No prompts, messages or dialog boxes
/passive Shows only a progress bar, with no prompts
/norestart Never restarts the computer after the installation
/l*v file.log Writes a verbose log
/x Uninstalls the package

/quiet and /qn are equivalent. Microsoft's documentation says so directly, and you'll see both in the wild. The switches aren't case sensitive.

Always add /norestart

This is the part people learn the hard way. Microsoft's documentation for /quiet says: "If no reboot option is specified, the installer restarts the computer whenever necessary without displaying any prompt or warning to the user."

So a quiet install with no restart option can reboot a machine in the middle of someone's work. Pass /norestart, then check the exit code to see if a restart is still needed.

Write a log

msiexec /i "C:\example.msi" /qn /norestart /l*v "C:\Logs\example-install.log"

/l* logs everything except verbose output, and adding v includes that too. The folder has to exist already. Windows Installer won't create it.

Set the install folder and other options

Options are passed as properties, written NAME=value after the package path:

msiexec /i "C:\example.msi" /qn /norestart ALLUSERS=1 INSTALLDIR="D:\Apps\Example"

Three rules from Microsoft's documentation:

  • Only public properties can be set on the command line, and their names are treated as uppercase
  • A value with spaces has to be in quotation marks
  • Properties go after the package path. msiexec /i PROPERTY=VALUE example.msi is wrong

ALLUSERS=1 asks for a per-machine installation. The name of the folder property is chosen by whoever built the package. INSTALLDIR is common, and it isn't guaranteed, so check the vendor's documentation.

Silent uninstall

msiexec /x "C:\example.msi" /qn /norestart

You can give /x the original .msi file or the product code, which is a GUID in curly braces:

msiexec /x {AAD3D77A-7476-469F-ADF4-04424124E91D} /qn /norestart

If you're choosing a format for your own app, the comparison of MSI vs EXE covers what each is good at.

Inno Setup silent install

MyApp-Setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
Switch What it does
/SILENT Hides the wizard and shows the progress window
/VERYSILENT Hides the progress window too
/SUPPRESSMSGBOXES Suppresses message boxes. Only works together with /SILENT or /VERYSILENT
/SP- Skips the "This will install... Do you wish to continue?" prompt
/NORESTART Stops Setup from restarting the computer
/NOCANCEL Disables the Cancel button. Useful with /SILENT
/DIR="x:\dirname" Sets the install folder. It has to be a full path
/LOG="filename" Writes a log to that file. Plain /LOG writes one in the TEMP folder
/ALLUSERS, /CURRENTUSER Picks the install mode, if the installer was built to allow it
/TASKS="a,b" Selects tasks, such as a desktop icon

/VERYSILENT on its own isn't fully silent. Inno Setup's documentation notes that error messages are still shown unless you add /SUPPRESSMSGBOXES, and the opening prompt still appears unless you add /SP-.

The restart warning applies here as well. From the documentation: if a restart is needed and /NORESTART isn't used, a very silent Setup "will reboot without asking".

To repeat one installation on many machines, run it once with /SAVEINF="settings.inf" to save the choices, then pass /LOADINF="settings.inf" on the others.

Silent uninstall

Inno Setup puts an uninstaller in the app's folder, named unins000.exe (the digits can differ):

"C:\Program Files\MyApp\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART

For installers that update an app in place, see Inno Setup and NSIS auto updates.

NSIS silent install

MyApp-Setup.exe /S

That's the whole thing, with two details that trip people up:

  • /S is case sensitive. A lowercase /s doesn't work
  • /D has to be last, and unquoted. NSIS's documentation says the folder switch "must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces"
MyApp-Setup.exe /S /D=C:\Program Files\MyApp

NSIS has no standard log switch. Anything else, such as a log path or an option, exists only if the installer's author added it, so check the vendor's documentation.

Silent uninstall

"C:\Program Files\MyApp\uninstall.exe" /S

The uninstaller's file name is set by the author, so it may not be uninstall.exe. One more quirk: an NSIS uninstaller copies itself to a temporary folder and runs from there, so your script can't wait for it or read its exit code. Adding _?= with the install folder stops that copy. Like /D, it has to be last and unquoted:

"C:\Program Files\MyApp\uninstall.exe" /S _?=C:\Program Files\MyApp

InstallShield silent install

InstallShield's Setup.exe behaves differently depending on the kind of project it was built from.

Basic MSI projects. Setup.exe is a wrapper around an .msi. /s hides the wrapper's own dialog and /v passes switches through to msiexec:

Setup.exe /s /v/qn

To pass more than one thing through, quote the lot. There's no space between /v and what follows it:

Setup.exe /s /v"/qn INSTALLDIR=D:\Destination"
Setup.exe /s /v"/qn /l*v c:\test.log"

InstallScript projects. These need a response file that holds the answers to the wizard. Record one by running the installer with /r. It writes Setup.iss to the Windows folder unless you name a path with /f1. Then play it back with /s:

Setup.exe /r /f1"C:\Temp\Setup.iss"
Setup.exe /s /f1"C:\Temp\Setup.iss" /f2"C:\Temp\Setup.log"

/f1 names the response file and /f2 names the log. Use full paths. InstallShield's documentation warns that relative paths give "unpredictable results".

Setup.exe /x uninstalls a product installed from a Basic MSI or InstallScript MSI project. For a silent uninstall of a Basic MSI, the simplest route is msiexec /x with the product code, as shown in the MSI section.

If Setup.exe returns before a Basic MSI installation is finished, add /w, which makes it wait.

One more thing to know: /s doesn't automatically silence InstallShield prerequisites that the installer runs first. If a silent install still shows a window, that's usually where it comes from.

WiX bundles (Burn)

A WiX bundle is a setup.exe that chains several packages together. The standard WiX bootstrapper accepts:

MyApp-Bundle.exe /quiet /norestart /log "C:\Logs\bundle.log"
Switch What it does
/quiet No interface and no prompts. /silent, /q and /s do the same
/passive Minimal interface with no prompts
/norestart Suppresses any attempt to restart
/log file Logs to that file. By default a log is created in %TEMP%
/uninstall Uninstalls. Combine it with /quiet
/repair Repairs
/layout [directory] Makes a complete local copy of the bundle, for offline installs

Switches can start with / or -. A bundle can replace the standard bootstrapper with a custom one, so a vendor's bundle may take extra options.

A plain .msi built with WiX is an MSI like any other. Use the msiexec commands above.

Velopack

Velopack's Setup.exe installs into the user's %LocalAppData% folder by default, in a folder named after the app's package ID:

MyApp-win-Setup.exe --silent
MyApp-win-Setup.exe --silent --installto "D:\Apps\MyApp" --log "C:\Logs\myapp.log"

--silent (or -s) hides all dialogs and answers yes to every prompt. To uninstall silently, run the Update.exe that sits in the install folder:

"%LocalAppData%\MyApp\Update.exe" uninstall --silent

If the vendor also ships Velopack's .msi, use msiexec /i MyApp.msi /qn, with VELOPACK_INSTALLDIR="D:\Apps\MyApp" to change the folder. The Velopack guide covers the rest.

MSIX

An MSIX package has no wizard to silence. Windows installs it from PowerShell with one command:

Add-AppxPackage -Path .\MyApp.msix

That adds the package for the current user. To remove it, look up the package's full name and pass it to Remove-AppxPackage:

Get-AppxPackage -Name *MyApp*
Remove-AppxPackage -Package 'MyApp_1.0.0.0_x64__8wekyb3d8bbwe'

The package has to be signed with a certificate the computer trusts, or the install fails. The MSIX guide explains the signing rule.

winget

If the app is in a winget source, you don't need to know the installer type. winget knows the right switches for each package:

winget install --id Publisher.App --exact --silent --accept-package-agreements --accept-source-agreements
Option What it does
-h, --silent Runs the installer in silent mode and suppresses all UI
--accept-package-agreements Accepts the package's license without prompting
--accept-source-agreements Accepts the source's terms without prompting
-l, --location Install folder, if the installer supports it
-o, --log Writes winget's log to a file
--scope Targets the user or the machine
--custom Extra arguments for the installer, added to the defaults
--override A string passed directly to the installer

Note that -h is --silent in winget. It isn't help. Uninstalling works the same way:

winget uninstall --id Publisher.App --silent

How to tell which installer you have

A file called setup.exe could be any of the types above. Ways to find out, quickest first:

  1. Look at the extension. .msi is Windows Installer. .msix and .appx are MSIX packages. An .exe needs more digging
  2. Ask winget. winget show --id Publisher.App prints an "Installer Type" line if the app is in the catalog. The values include msi, msix, inno, nullsoft (NSIS), wix and exe
  3. Ask the installer. Run setup.exe /? in a test machine. An Inno Setup installer answers with a summary of its switches. Microsoft's winget documentation makes the same suggestion: you can often find the silent switches by passing -?
  4. Install it once and look at how it uninstalls. Windows keeps an UninstallString for installed apps under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall. If it calls msiexec, there's an MSI inside. If it points at unins000.exe, it's Inno Setup
  5. Read the vendor's deployment documentation. Many vendors add their own switches for license keys, components and shortcuts, and those are documented nowhere else

Do the experiments in a virtual machine. An installer that doesn't recognise /? may just start installing.

Exit codes

A silent install shows nothing, so the exit code is how your script knows what happened. In PowerShell:

$p = Start-Process msiexec.exe -ArgumentList '/i "C:\example.msi" /qn /norestart' -Wait -PassThru
$p.ExitCode

-Wait holds the script until the installer finishes and -PassThru returns the process, which carries the exit code.

Windows Installer (msiexec)

Code Meaning
0 Success
3010 Success, and a restart is required to complete the install
1641 Success, and the installer has started a restart
1602 The user cancelled the installation
1603 A fatal error occurred during installation
1605 The product isn't installed (seen when uninstalling)
1618 Another installation is already in progress
1619 The package couldn't be opened. Check the path
1638 Another version of this product is already installed

Treat 0, 3010 and 1641 as success. Microsoft's documentation groups them that way. 1603 is the catch-all failure, and the verbose log is where you find the real cause.

Inno Setup

Code Meaning
0 Setup ran to completion
1 Setup failed to initialize
2 Cancelled before the installation started
3 A fatal error while preparing to move to the next phase
4 A fatal error during the installation
5 Cancelled during the installation
7 The "Preparing to Install" stage found that Setup can't proceed
8 The same, and a restart is needed to fix it

By default Inno Setup returns 0 even when a restart is needed. /RESTARTEXITCODE=3010 makes it return a code of your choice in that case, so one script can handle MSI and Inno Setup installers alike.

NSIS

0 means normal execution, 1 means the user aborted, and 2 means the script aborted. An author can set other values.

Making your own installer silent-friendly

If you're the one shipping the app, a working silent install decides whether an IT team can roll your product out to 300 computers or gives up. It's also what your own auto updater runs. A checklist:

  • Test the silent install and the silent uninstall on a clean machine for every release. A dialog you added last month is enough to hang an unattended deployment forever
  • Use message boxes that can be suppressed. In Inno Setup, MsgBox in [Code] can't be suppressed, and SuppressibleMsgBox can. In NSIS, give every MessageBox a default answer with /SD, and check IfSilent before anything that opens a window
  • Never restart on your own. Honour the no-restart switch and report the need through the exit code
  • Accept every wizard choice as a parameter. Install folder, shortcuts, components and whether to launch the app afterwards
  • Document the command. One page with the install command, the uninstall command and your custom parameters saves a support ticket per customer
  • Return real exit codes and write a log. The person deploying your app can't see your error dialog
  • Sign the installer and publish a checksum. Deployment teams check both. See SignTool and the checksum calculator

If you want your app in the winget community repository, a silent install is required. Microsoft's documentation says: "All tools must support a silent install."

Passing a license key at install time

Companies that buy many seats don't want an employee typing a key into each computer. Let them pass it to the installer, store it, and have the app activate on first launch.

MSI. Read a public property:

msiexec /i MyApp.msi /qn /norestart LICENSEKEY="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"

Inno Setup. The {param:Name|Default} constant reads a command-line parameter of the form /Name=value, so the script can write {param:LICENSEKEY} to the registry or a file:

MyApp-Setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LICENSEKEY=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

NSIS. Read it in .onInit with GetOptions. Custom parameters go before /D:

MyApp-Setup.exe /S /LICENSEKEY=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /D=C:\Program Files\MyApp

A key on a command line can end up in logs and deployment tools, so use a key that's limited to that customer's seat count.

LicenseSeat issues those keys and limits how many devices each one can activate. From the Starter plan it also hosts your releases and serves the update feed, to customers whose license covers the new version. It charges a flat monthly fee and takes 0% of your revenue. For the update side, see Velopack and WinSparkle.

Common questions about silent installs

What is a silent install?

An installation that runs without showing a wizard or asking questions. Every choice comes from the command line or a file prepared in advance. It's also called an unattended or quiet install.

How do I silently install an EXE?

It depends on what built it. Inno Setup installers take /VERYSILENT /SUPPRESSMSGBOXES /NORESTART. NSIS installers take /S. InstallShield takes /s /v/qn for MSI-based projects. WiX bundles take /quiet /norestart. The section "How to tell which installer you have" shows how to find out which one it is.

How do I silently install an MSI?

Run msiexec /i "path\to\app.msi" /qn /norestart. Add /l*v "C:\Logs\app.log" to get a log, and put any properties after the package path.

What is the difference between /quiet and /qn?

Nothing in practice. Microsoft's documentation says the equivalent of /quiet is /qn. /passive is the one that differs: it shows a progress bar.

What is the difference between /SILENT and /VERYSILENT?

Both hide the Inno Setup wizard. /SILENT still shows the progress window, and /VERYSILENT hides that too. Neither suppresses message boxes without /SUPPRESSMSGBOXES.

Why did my silent install restart the computer?

Because nothing told it not to. A quiet msiexec install restarts whenever it needs to unless you pass /norestart, and a very silent Inno Setup install does the same without /NORESTART.

What does exit code 3010 mean?

The installation succeeded and Windows needs a restart to finish it. It's a success code. Schedule the restart for a time that suits the user.

What does exit code 1603 mean?

A fatal error during an MSI installation. It's a general failure code, so run the install again with /l*v and read the log to find the cause.

How do I silently uninstall a program?

For an MSI, msiexec /x with the .msi file or the product code, plus /qn /norestart. For Inno Setup, run unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART. For NSIS, run the uninstaller with /S.

Are silent install switches case sensitive?

For msiexec, no. For NSIS, yes: its documentation says /S is case sensitive. When in doubt, type a switch exactly as its documentation shows it.

Can I pass a license key during a silent install?

Only if the installer was built to accept one. Vendors that support it document a property or parameter for it, such as LICENSEKEY=. If you're building the installer, the section above shows how to add one for MSI, Inno Setup and NSIS.