Revenera Documentation site will be unavailable on July 2nd due to scheduled maintenance. For more information see the status dashboard.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JamiZhang
Level 3

Displaying Patch Name in ARP not work in InstallScript MSI project

Why this feature request (http://community.installshield.com/showthread.php?t=156632&highlight=patch+uninstall+arp) is forgot in InstallShield 2008 professional?

We had a lot of InstallScript MSI project, our customers want to install patch and roll back. But it still cannot list patch name in APR. The first dialog that ask you to click the "Next" button should be "Update" button in MSI project where rollback works.

Does any InstallShield 2008 updates (InsatllScript Objects - 221MB, InstallScript .NET Object - 595MB, InstallScript Object Templates - 328MB) fix this problem?

Could your guys in Macrovision provide a workaround or samples how to add the ARP patch entry with "remove" button? Someone suggest to search MS' blog (http://community.installshield.com/showthread.php?t=155717&highlight=patch+uninstall+installscript+msi) and (http://community.installshield.com/showthread.php?t=156454&highlight=patch+uninstall+arp). That doesn't help.

Thanks,
Labels (1)
0 Kudos
3 Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The updates you reference are all add-ons for InstallScript projects, not InstallScript MSI, so they will not help here. I don't believe we have full support for uninstallable patches in InstallScript MSI projects at this point. Perhaps it's time to start voting for this at http://www.installshield.com/feedback/.
0 Kudos
JamiZhang
Level 3

I work with Macrovision Support Joshua L and find a workaround:
1. Add the following custom action with conditions "PATCH".
You maybe need to set "Generate Patch GUID" to "No" in "Advanced" tab of Patch Design, then copy Patch GUID to the following {Patch_GUID}.

function AddPatchEntry(hMSI)
STRING szKey, szClass, szName, szCode, szUninstall, szParentKey;
NUMBER nvType, nvSize;
begin
nvSize = 256;
MsiGetProperty (hMSI, "ProductName", szName, nvSize);
MsiGetProperty (hMSI, "ProductCode", szCode, nvSize);
Sprintf(szUninstall, "Msiexec /I %s MSIPATCHREMOVE={Patch_GUID} /qb", szCode);
Sprintf(szParentKey, "InstallShield_%s", szCode);

nvType = REGDB_STRING;
szClass = "";
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\FuBar1";
nvSize = -1;
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
RegDBCreateKeyEx( szKey, szClass );
RegDBSetKeyValueEx( szKey, "DisplayName", nvType, "FuBar - Patch 1", nvSize );
RegDBSetKeyValueEx( szKey, "UninstallString", nvType, szUninstall, nvSize );
RegDBSetKeyValueEx( szKey, "ParentDisplayName", nvType, szName, nvSize );
RegDBSetKeyValueEx( szKey, "ParentKeyName", nvType, szParentKey, nvSize );
end;

2. Add the following custom action with conditions "NOT PATCH".

function DeletePatchEntry(hMSI)
STRING szKey, szClass;
NUMBER nvType, nvSize;
begin
nvType = REGDB_STRING;
szClass = "";
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\FuBar1";
nvSize = -1;
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );

// Call RegDBDeleteKey to delete the key created.
RegDBDeleteKey (szKey);
end;
0 Kudos
Not applicable

Glad to hear you found a workaround.

Just for the sake of providing some additional information, we document this limitation here:
http://support.installshield.com/kb/view.asp?articleid=Q111683
0 Kudos