Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated MSI installation

What is the best way to automatically install an MSI file or installer .exe? We want to do some automated testing from our build system on the installed copy of the product. Our installer has the usual license acceptance screen, install location, etc.


As FryHard pointed out there are two options in particular that seem handy:

  • "/quiet" - no use interaction
  • "/passive" - process bar only, unattended mode
like image 615
Luke Quinane Avatar asked Oct 08 '08 04:10

Luke Quinane


People also ask

How do I automate MSI installer?

If you head over to one of your MSI packages in the command prompt and run a: Myproduct. MSI /? A screen will pop up with all the details of command line parameters that you can pass to the MSI.

What is MSI based installation?

The . MSI file extension stands for Microsoft Software Installer. It is a Windows Installer format that uses Microsoft's Windows Installer service to configure installer packages, such as Windows applications or update packages. The MSI file extension is used to install software on Windows operating systems.

Is MSI a silent install?

If you need to silently install an InstallScript MSI project without using Setup.exe, you can use the MSI silent mode. The installation is activated from an advertised shortcut. The installation is activated from install-on-demand. When the product is removed when an update package is running.

How do I stop MSI from installing?

To block MSI installer, you can turn off Windows Installer using group policy or registry tweak. Open Local Group Policy Editor and expand Computer Configuration -> Administrative Templates -> Windows Components -> Windows Installer . Double-click the policy named “Turn off Windows Installer” in the right pane.


2 Answers

To automate the installation of an MSI package, you can use the /I option, like this:

msiexec.exe /qn /i mypackage.msi

Keep in mind that you need to specify the properties the MSI package expect the user to specify through the UI, and for which it does not have a default value.

You can use the Orca tool to see the list of properties and fiddle around with MSI conditions, etc. And to set values for the properties, you can just specify it in command line; e.g. to set a property ISDEBUG:

msiexec.exe /qn /i mypackage.msi ISDEBUG=1

Side note: To automate uninstall, use the /X option with the package or the product code:

msiexec.exe /qn /x mypackage.msi

or this (where you need to change the CLSID with your product code):

msiexec.exe /qn /x {B741B8A3-8DCB-44E0-B06F-2A11F56572DB}
like image 70
Franci Penov Avatar answered Sep 27 '22 21:09

Franci Penov


If you head over to one of your MSI packages in the command prompt and run a:

Myproduct.MSI /?

A screen will pop up with all the details of command line parameters that you can pass to the MSI. I am sure that in this way you could install your application via a command prompt and in this way automate it.

like image 28
FryHard Avatar answered Sep 27 '22 21:09

FryHard