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

Need to override the check for newer version installed


5 replies to this topic

robscoding

robscoding
  • Full Members
  • 3 posts

Posted 13 September 2018 - 18:04

I am new to installer stuff .What I am trying to is that currently the package doesn't allow to downgrade  from a newer version to older version.I am trying to do teh removal part using script and override this based on user response during installation . If the user select yes , uninstall and install the new.I have verified that the custom action in script works good if executed.

 

I have added a custom action to the .rul script  and added it as the first action in the sequence.But when I debug I see that that the custom action is getting hit only after "preparing to remove"  user prompt dialog  , if any other version is present .I know this is something of a crazy use case ...

 

Appreciate if someone can help me ..many thanks in advance.

 

-Robs



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 September 2018 - 18:30

If this is a Mjaor Upgrade/Downgrade, i.e. the product code changed but the upgrade code is the same, then removing the ISPreventDowngrade custom action from the sequence (or disabling using a condition) should be sufficient - no need for a uninstall script. Go to Behaviour and Logic > Custom Actions and Sequences, right click the top node "custom actions" and check "show all custom actions" to see the ISPreventDowngrade action.



robscoding

robscoding
  • Full Members
  • 3 posts

Posted 13 September 2018 - 19:07

If this is a Mjaor Upgrade/Downgrade, i.e. the product code changed but the upgrade code is the same, then removing the ISPreventDowngrade custom action from the sequence (or disabling using a condition) should be sufficient - no need for a uninstall script. Go to Behaviour and Logic > Custom Actions and Sequences, right click the top node "custom actions" and check "show all custom actions" to see the ISPreventDowngrade action.

Thanks a lot for the prompt response ..My aim is to uninstall any previous versions / or future versions  present on the system  for any upgrades ...just to uninstall the "installed" version  first and install the new version in the setup



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 September 2018 - 11:04

That should work as I described: Change the ProductCode (and the PackageCode of course), keep the UpgradeCode, disable the ISPreventDowngrade action if the user wants to downgrade.



robscoding

robscoding
  • Full Members
  • 3 posts

Posted 19 September 2018 - 18:34

 

If this is a Mjaor Upgrade/Downgrade, i.e. the product code changed but the upgrade code is the same, then removing the ISPreventDowngrade custom action from the sequence (or disabling using a condition) should be sufficient - no need for a uninstall script. Go to Behaviour and Logic > Custom Actions and Sequences, right click the top node "custom actions" and check "show all custom actions" to see the ISPreventDowngrade action.

Thanks a lot for the prompt response ..My aim is to uninstall any previous versions / or future versions  present on the system  for any upgrades ...just to uninstall the "installed" version  first and install the new version in the setup

 

I did tried the mentioned option too ..Like changing the product code..it leaves two version of same programs in add/remove programs which is not what intended.Is there any other options to achieve this.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 September 2018 - 11:04

Sorry, forgot to mention that you must also add a "Major Upgrade" entry under Media > Upgrades. Select "Products sharing ym upgrade code" and "within a specific range of versions". Enter a low value in the min version field (e.g. 0.0.1) and leave the amx version field empty. Thus you make sure any version is removed. (You can't leave both fields empty)