A number of rather complicated processes takes place when an MSI package created by the MSI Wrapper is installed. However, the basic principle is pretty simple. The following is an outline of what is happening during the installation of the MSI package.
Unpacking
The wrapped installer is unpacked and saved to a temporary folder.
Installation
After the wrapped installer is unpacked it is run with the command line you specified when you built the MSI package. If you used the advanced features when you built the MSI package, then the command line can depend on the UI level of the MSI installation. This means that a quiet installation can have another command line compared to a normal installation. In addition to the command line parameters you specified when building the MSI package, it will add the arguments from the WRAPPED_ARGUMENTS if you specified any.
Registration
When the wrapped installer has finished, it will typically have added itself to the list of installed programs on the machine. You can see this list under Add/Remove Programs in your computer’s control panel.
Based on the application id you entered when building the MSI package, it will locate the new entry and mark it as a system component. This means that it will be invisible to the user but it will still be in there. It is important that you enter the correct application id. Otherwise, it will not be able to find the program that you just installed.
Since the wrapped installer is now invisible, you will only see the entry of the MSI in the list of installed programs.
Uninstallation
The uninstallation of the MSI package can be triggered by the user from the control panel. It can also be triggered by running msiexec.exe /x on a command line or any other tool that will start the uninstallation of a particular MSI package.
When the MSI package is uninstalled, it will look for the wrapped installer’s entry in the list of installed programs. This is the one that was marked as a system component during the installation. This entry holds information about how the installed program should be uninstalled.
If it finds the uninstall command line it is looking for, it will run this before removing the entry for the MSI package itself.
Summary
The MSI package will run the wrapped installer and hide its entry in the list of installed programs. This enables it to run the correct uninstall command when the MSI package is uninstalled.