大网数据广告活动
安装更新与部署

Adding and Removing an Application and Leaving No Trace in the Registry

· 52CE 我爱测

If an application must be registered, author the installation package as described in the section Adding and Removing Registry Keys on the Installation or Removal of Components.

If an application must be registered, author the installation package as described in the section Adding and Removing Registry Keys on the Installation or Removal of Components. Registration is used by the installer for advertisement and by the Add or Remove Programs feature in Control Panel. If an application is not registered, it cannot be advertised, and is not listed in the Add or Remove Programs feature in Control Panel.

You can omit registering an application by removing the RegisterProduct Action, RegisterUser Action, PublishProduct Action, and PublishFeatures Action from the InstallExecuteSequence Table and AdvtExecuteSequence Table. All of these actions must be removed, or some trace of the application may remain in the registry. Removing all of these actions prevents the application from being listed in the Add or Remove Programs feature in Control Panel, and prevents the advertisement of the application. Removing all of these actions also prevents the application from being registered with the Windows Installer configuration data. This means that you cannot remove, repair, or reinstall the application by using the Windows Installer Command-Line Options, or the Windows Installer application programming interface (API).

To hide an application from the Add or Remove Programs feature in Control Panel and still be able to use the Windows Installer to manage an application, leave the registration actions in the sequence tables, and set the ARPSYSTEMCOMPONENT Property in the Property Table to 1 (one). The application does not appear in the Add or Remove Programs feature, but you can use the Windows Installer to install-on-demand, uninstall, repair, and reinstall the application.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。