ARPNOREMOVE 属性

设置 ARPNOREMOVE 属性会在控制面板中禁用用于移除产品的“添加或移除程序”功能。 对于 Windows 2000,这会在控制面板的“添加或移除程序”中禁用产品的“移除”按钮。 对于早期操作系统,这会在控制面板的“添加或移除程序”中,从已安装产品列表中移除产品。

如果设置了 ARPNOREMOVE 属性,则 RegisterProduct 操作会在以下注册表项下写入值“NoRemove”:

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{product key}

通过设置 ARPNOREMOVE 属性,可防止将 UninstallString 值写入该注册表项下。 UnistallString 值是用于移除产品而不是重新配置产品的命令行。

备注

例如,可以在自定义转换期间设置此属性,以防止用户移除管理员自定义。

要求

要求
版本
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5 或更高版本。 Windows Server 2003 或 Windows XP 上的 Windows Installer。 若要了解 Windows Installer 版本所需的最低 Windows Service Pack,请参阅 Windows Installer 运行时要求

请参阅

属性