Tip: How to run an MSI uninstallation
On this page
we explained how to run an MSI installation during Visual
Installer's setup process. You may wonder if it is possible to
uninstall these files during Visual Installer's uninstallation
process, and the answer is: yes, it is possible.
There is another script command available that functions like
but it is run during an uninstallation process instead. The name
of the command is
and it takes the same three parameters as
UNINSTALL_MSIEXEC %Filename, %Param, %Wait
path to the MSI file, for example
parameters to send to Windows Installer. Optional.
the MSI installation is completed, or not. Optional.
The %Filename parameter must always be specified and must
contain a full path to an MSI file.
parameter must contain all command line parameters (switches)
that you want to pass to Windows Installer. The use of %Param
is optional, but if you want to make an uninstallation the
parameter must contain at least the /x switch. The /x
switch tells Windows Installer to make an uninstallation. The
parameter can also contain another command line
switches, like /qn (silent installation), so if you need
to use more than one switch you can separate them with a space
(e.g.: "/qn /x").
A complete list with possible parameters is available on
this Microsoft page.
%Wait parameters is also optional. To get more information
%Wait parameter and its use, you can read
the page with
Examples of usage -
The example below shows how to use
to install files during Visual Installer's installation process
and how to use
to uninstall same files during Visual Installer's uninstallation
// Run this MSI installation during Visual Installer's
// Run this MSI uninstallation during
Visual Installer's uninstallation process
%DESTDIR\MySetup.msi, /qn /x
By passing the /x switch to Windows Installer (via
we inform Windows Installer that we want to make an
uninstallation. By passing the /qn switch we inform
Windows Installer that we want to make a silent installation and
uninstallation. The command lines above should be entered in the
After installation tab in the script window:
< Go back (to the