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.

ValueWindows Installer property
DisplayName ProductName property
DisplayVersion Derived from ProductVersion property
Publisher Manufacturer property
VersionMinor Derived from ProductVersion property
VersionMajor Derived from ProductVersion property
Version Derived from ProductVersion property
HelpLink ARPHELPLINK property
HelpTelephone ARPHELPTELEPHONE property
InstallDate Installation date
InstallLocation ARPINSTALLLOCATION property
InstallSource SourceDir property
URLInfoAbout ARPURLINFOABOUT property
URLUpdateInfo ARPURLUPDATEINFO property
AuthorizedCDFPrefix ARPAUTHORIZEDCDFPREFIX property
Comments

ARPCOMMENTS property

Comments provided to the Add or Remove Programs control panel.

Contact

ARPCONTACT property

Contact provided to the Add or Remove Programs control panel.

EstimatedSize Determined and set by the Windows Installer.
Language ProductLanguage property
ModifyPath Determined and set by the Windows Installer.
Readme

ARPREADME property

Readme provided to the Add or Remove Programs control panel.

UninstallString Determined and set by Windows Installer.
SettingsIdentifier MSIARPSETTINGSIDENTIFIER property

See Also

About Properties
Configuring Add/Remove Programs with Windows Installer
Property Reference
Using Properties

 

在控制面板中双击Item时,会根据UninstallString启动卸载过程,用InstallShield制作的安装包生成UninstallString时会自动添加RemoveOnly参数,在安装包的OnMaintUIBefore中判断REMOVEONLY是否为TRUE,为TRUE则可以认为当前过程是从控制面板执行的,而不是又执行了一遍安装包。在已安装过程序的环境下再次执行安装包会走卸载的过程,而双击安装包默认情况下是不带参数的,此时REMOVEONLY为FALSE,由此可以根据这个参数来判断卸载过程是从哪里启动的。另外,如果是从控制面板执行卸载,则调用的是C:\Program Files\InstallShield Information下的备份包。备份包的由来是安装过程完毕后安装包将自身拷贝到C:\Program Files\InstallShield Information下的。而UninstallString中还有个参数是runfromtemp,该参数的含义是,当从控制面板执行卸载的时候,把备份包拷贝一份到Temp目录下,然后从Temp目录启动卸载过程,这样安装包才能完成卸载过程,否则会产生卸载过程删除自身文件的情况,程序运行中这是不可能的。其实拷贝到Temp目录下的有两个文件夹,一个是GUID文件夹,还有一个是随机文件夹,可以根据文件夹创建时间来找这两个文件夹。UninstallString还有一个参数应该是语言种类。

原文地址:https://www.cnblogs.com/BeyondTechnology/p/1917417.html