New script command in Visual Installer: UNINSTALL_MSIEXEC

Earlier this year we added the MSIEXEC script command to Visual Installer’s script language. MSIEXEC is used to run an MSI installation from a Visual Installer setup package. Windows Installer is used for the setup process. We have now added a new script command that functions like MSIEXEC but it is run during the uninstallation process instead. The name of the new script command is UNINSTALL_MSIEXEC.

Just like MSIEXEC, the UNINSTALL_MSIEXEC command takes three parameters:

%Filename : Full path to the MSI setup package
%Param : Command line parameters to send to Windows Installer
%Wait : Pause Visual Installer until Windows Installer is ready

By combining MSIEXEC with UNINSTALL_MSIEXEC you will have a nice and easy way to support both installation and uninstallation of a MSI setup package in a single Visual Installer project. The picture below shows how to use these two commands in a Visual Installer project:

As you can see, only two lines with script code is needed to handle both an installation and uninstallation of a MSI setup package. MSI_EXEC is run during the installation process and UNINSTALL_MSIEXEC is run during the uninstallation process.

Tips
We have published tips on our website that explains in detail how to use the MSIEXEC and UNINSTALL_MSIEXEC command. Click on the links below to read the tips:

> Tip: How to run an MSI installation from script
> Tip: How to run an MSI uninstallation from script

Leave a Reply