Martin Ba
Martin Ba

Reputation: 38775

How is the list of 'Add/Remove Programs' built?

I have a Wix Bundle Bootstrapper installing 2 MSI files. If I use the bootstrapper, the "Add/Remove Programs" list only contains the entry of the boostrapper.

If I use the MSI files separately, I get two separate entries in this list, one for each MSI file.

What's the officially documented way how the entries in the "Add/Remove Programs" list in Control Panel are built?

Specifically, they tell us -

Configuring Add/Remove Programs with Windows Installer

You can supply all of the information needed to configure Add/Remove Programs in Control Panel by setting the values of certain installer properties in your application's Windows Installer package. Setting these properties automatically writes the corresponding values into the registry. (...)

and they also tell us about the

Uninstall Registry Key

The following installer properties give the values written under the registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

The values are stored in a subkey identified by the application's product code GUID.

But it's not obvious whether having an entry here is sufficient, and what subkey or value entries are required.

Upvotes: 4

Views: 4674

Answers (1)

Stein Åsmul
Stein Åsmul

Reputation: 42136

I am honestly not quite sure what the exact question is - but I will give it a go. The Burn feature of WiX will create a single entry in Add / Remove by suppressing the individual MSI files from showing up in the add / remove list.

Under the hood this is done by setting the ARPSYSTEMCOMPONENT property during installation equal to 1 (or they achieve the same effect by some technically different, but functionally equivalent way that I am unfamiliar with).

You can set this property yourself during installation (specified as a parameter to msiexec.exe) to hide any MSI from the Add / Remove list. Technically it will translate to a DWORD registry value SystemComponent = 1 written to the MSI's uninstall registry key (there are several different ones depending on the type of install and MSI architecture):

  • 64-bit: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode}\
  • 32-bit: HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode}\
  • Per-User: HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode}\

You can opt to show all MSI files you install with Burn in the Add / Remove list. You just set the Visible attribute to yes:

<MsiPackage SourceFile="MyMsi.msi" Visible="yes" />

That is just the MsiPackage element - you obviously need to insert it into a proper Burn source file with Chain, Bundle and Wix elements. Here is a larger sample. And here is a sample of customizing the WiX Burn GUI. And I will throw in a link to the WiX tutorial as well, on Bootstrapping.

Note that I think the Burn entry in Add / Remove will probably always be visible - in addition to the individual MSI packages / EXE packages. There might be a way to customize this too that I am not familiar with.

Upvotes: 7

Related Questions