'Add/Remove Programs'的列表是如何构建的?

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

我有一个 Wix Bundle Bootstrapper 安装了 2 个 MSI 文件。如果我使用引导程序,"Add/Remove Programs" 列表只包含引导程序的条目。

如果我单独使用 MSI 文件,我会在此列表中获得两个单独的条目,每个 MSI 文件一个。

控制面板中 "Add/Remove Programs" 列表中的条目的官方记录方式是什么?

具体来说,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. (...)

他们also tell us about

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.

但是这里的条目是否足够,以及需要什么子键或值条目并不明显。

老实说,我不太确定确切的问题是什么 - 但我会试一试。 WiXBurn 功能将通过抑制单个 MSI 文件出现在添加/删除中来在 Add / Remove 中创建一个条目列表。

在引擎盖下,这是通过在安装期间将 ARPSYSTEMCOMPONENT property 设置为 1 来完成的(或者它们通过一些我不熟悉的技术上不同但功能等效的方式实现相同的效果) .

您可以在安装期间自行设置 属性(指定为 msiexec.exe 的参数)以隐藏 Add / Remove 列表中的任何 MSI。从技术上讲,它将转换为写入 MSI 的卸载注册表项的 DWORD 注册表值 SystemComponent = 1(根据安装类型和 MSI 体系结构,有几个不同的值):

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

您可以选择在添加/删除列表中显示您使用刻录安装的所有 MSI 文件。您只需将 Visible attribute 设置为 yes:

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

那只是 MsiPackage element - 您显然需要将其插入到包含 ChainBundleWix 元素的正确刻录源文件中。 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

请注意,我认为 Add / Remove 中的 Burn 条目可能始终可见 - 除了各个 MSI 包/EXE 包之外。可能还有一种我不熟悉的自定义方法。