How can a silent installer be created in WiX that does not display any UI dialogs to the user and installs, upgrades and uninstalls with default settings?
4 Answers
Windows Installer (MSI) uses the following command line arguments to be silent:
Silent install or silent major upgrade:
msiexec.exe /i foo.msi /qn
Silent minor upgrade:
msiexec.exe /i foo.msi REINSTALL=ALL REINSTALLMODE=vomus /qn
Silent uninstall:
msiexec.exe /x foo.msi /qn
Executable path:
C:\Windows\system32\msiexec.exe

- 4,699
- 4
- 33
- 43

- 54,556
- 6
- 63
- 100
-
8Great answer. Slight issue is that if you have to authorise an installation through a UAC dialog, none is presented using /qn. However, if you use /qb you get the option to authorise it. – Steztric Jun 22 '15 at 13:11
-
6That is functions as designed. Silent installs are by definition non-interactive and a UAC prompt is an interaction. Failure to click yes in 30 seconds will fail the install. Your calling process should already be elevated prior to invoking the install. – Christopher Painter Dec 24 '15 at 14:24
-
I am also facing the same problem, when I tried running the MSI in full UI mode by double clicking on the MSI it prompts me a UAC(Program name, publisher: unknown, File Origin) and I need to choose yes to proceed with the installation but my need is to install the MSI using cmd msiexec command in non interactive mode(basically it should automatically take yes in UAC) but that is not happening in any case(/q /a /qn). I am using a tool to deploy the MSI on 100's of server and it internally creates a command (msiexec /i
/qn) which leads to failure. Any one have solution for this ? – Vaibhav Jain Aug 30 '17 at 07:34
Installer .exe's created with WiX can be run from the command line without requiring user input by using one of these command line parameters:
- /quiet - Displays no UI whatsoever
- /passive - Displays a UI but requires no user input. Essentially just displays an install progress bar
This answer is based on WiX 3.9.

- 6,829
- 4
- 36
- 52
All MSI installers whether created by WiX or not can be controlled via command line arguments. So you can make an installer with UI and still install it silently, there is no need to remove the UI from the installer just suppress it on the command line. Remember, make sure you add the upgrade element in your first installer so subsequent ones will match

- 1,797
- 2
- 13
- 19
-
The WiX upgrade element sets the UpgradeCode property and auhors a row in the Upgrade table. Technically the first MSI doesn't have to have an upgrade element. It only has to have the UpgradeCode property. If you forget to do this, there are tricks that involve a "fake" Upgrade table entry in subsequent MSI's with a custom action that sets the action property to the ProductCode of the first MSI. Try to avoid that though. :-) – Christopher Painter Feb 24 '14 at 16:05
Just don't include any UI/UIRef elements and then no UI will be included :)

- 22,080
- 4
- 63
- 85
-
1That's of very limited value. Having a user double click on an MSI and it installs without any confirmation or status of results is a very suboptimal user experience IMO. It's fine if your part of a bunch of MSI's being changed together by another program handling the UI ( Think Visual Studio, SQL Server..) but if it's a stand alone MSI, I consider it a job only half done. – Christopher Painter May 31 '12 at 19:34
-
I agree it's definitely of limited value, but it does answer the OP. A better (or "correct") solution is to use msiexec parameters as you've detailed below. – saschabeaumont Jun 04 '12 at 23:34
-
Using msiexec.exe with command line parameters specifying quiet mode with no-ui is the way to go. – nil Feb 11 '13 at 18:30
-
1@Christopher Painter. Installing any application in an enterprise environment on hundreds of machines requires processes such as using Group Policy. Having a UI is suboptimal and waste of time forcing force staff to go and press keys on EVERY machine for a company, simply where a new app is required. – midspace Mar 05 '13 at 04:05
-
4Use the "msiexec.exe /i foo.msi /qn" already mentioned. Thus the UI is maintained for individual users and troubleshooting admins, and can be hidden for rollouts. – midspace Mar 05 '13 at 04:10
-
I use SCCM to push installers out to 100,000 machines at a time. I assure you that no one is going around click Next. But they can if they really need/want to. – Christopher Painter Mar 05 '13 at 12:10
-
When I tried this a UI was still included -- a small dialog that had a progress bar. I had to use 7zip to make a bootstrapper to unpack and execute the MSI with /qn. – Ed Bayiates Jun 28 '14 at 00:05
-
Unlike the up-voted answers, this one actually answers the question asked, and yet it's downvoted. I, and many other devs, know how to do this when calling msiexec from the commandline. My users don't run it from the commandline, but it runs automatically through GPO. The question was about *WIX*, not msiexec, people! – HiredMind Jul 28 '23 at 16:27