版权声明: 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息。
InstallScript工程中,安装包默认会在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{产品GUID}写入产品相关信息。
代码
function OnEnd()
NUMBER nRootKey;
STRING szKey;
begin
if (!REMOVEONLY) then
nRootKey = HKEY_LOCAL_MACHINE;
RegDBSetDefaultRoot ( nRootKey );
// Set up parameters for call to RegDBDeleteKey.
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" ^ PRODUCT_GUID;
RegDBDeleteKey ( szKey );
endif;
end;
NUMBER nRootKey;
STRING szKey;
begin
if (!REMOVEONLY) then
nRootKey = HKEY_LOCAL_MACHINE;
RegDBSetDefaultRoot ( nRootKey );
// Set up parameters for call to RegDBDeleteKey.
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" ^ PRODUCT_GUID;
RegDBDeleteKey ( szKey );
endif;
end;
上述方法只限于InstallScript工程类型。