Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to enable downgrade


2 replies to this topic

Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 10 October 2018 - 10:54

Hi

 

Our product does not support downgrade till now - we want to allow that now.- InstallShield InstallScript MSI project type.

 

To enable that I investigated and and found one custom action that prevents it I removed that one and changed Product code.

It worked fine  - I mean I can install the lower version but I see two products installed in control panel.

I am not an exert in InstallShield - I would like to get some suggestions on How can I downgrade with out having two items in appwiz.cpl (like uninstall and install)

 

 

Thanks

Madhu



deramor

deramor
  • Full Members
  • 187 posts

Posted 10 October 2018 - 22:38

Interestingly enough, I found that upgrades do this as well. 

 

This is the Custom action I use....

 

export prototype RemoveARPEntry_OnMajorUpgrade(HWND);
function RemoveARPEntry_OnMajorUpgrade(hMSI)
begin

    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    RegDBDeleteKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\InstallShield_" + PRODUCT_GUID);
    //MessageBox( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\InstallShield_" + PRODUCT_GUID, INFORMATION);

end;

 

However, the above code is executed by the product being removed (not the one doing the removing).  If you want to fully support this, at some point you'll run into situations where a version of your product doesn't have this code in it.  Therefore, you'll be left with this orphaned ARP entry. 

 

Another suggestion would be to find out the installed product's Product GUID instead of using the built in constant.  This way, the version being installed can do the clean-up.


Edited by deramor, 10 October 2018 - 22:38.


Madhu Sameena

Madhu Sameena
  • Full Members
  • 15 posts

Posted 11 October 2018 - 06:10

Hi

 

Thank you for the useful information.

 

This idea looks nice.

 

I have more question - Could you please give me some idea - How can I get the list of product GUIDs - If I give product name as my input 

So that I can validate this with my current installation version - And I can remove the other registry entries ?

 

And to perform this custom action - What is the best place (sequence) to execute ? Before installation complete(before InstallFinilize action ) or any other place ?

 

 

Thanks

Madhu