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 rollback after an error during update


3 replies to this topic

Sebbo11

Sebbo11
  • Full Members
  • 7 posts

Posted 20 February 2014 - 07:59

Hello,

 

I have InstallShield 2011 Professional and an InstallScript project. Currently I am implementing the update part. In this contect I am testing the rollback in case of an error:

- Update mode is detected in OnSetUpdateMode() (UPDATEMODE=TRUE) and OnUpdateUIBefore() is called

- In OnMoveData() it is called FeatureTransferData(...) and the new files are copied to the repective TARGETDIR

- Right after FeatureTransferData(...) I call 'abort' for testing and expected that the installed files are rolled back to the previous version but the setup just terminates with leaving the new files

- In case of a new installation all installed files are removed with this abort

 

Is there a mechanism to initiate an automatic rollback or must this implemented explicitely?

 

Regards

Sebastian



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 February 2014 - 10:38

InstallScript doesn't support rolling back to the previous version. That's a feature of Windows Installer, so you may want to use a Basic MSI project instead.



Sebbo11

Sebbo11
  • Full Members
  • 7 posts

Posted 20 February 2014 - 11:33

Hello Stefan,

 

thank's for the info. Then I have implement it by myself, but from my point of view this is an evidence of incapacity for InstallShield. I would have expected it as a basic feature of each setup tool.

 

Regards

Sebastian



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 February 2014 - 21:01

Rollback is one of the most important features introduced by Windows Installer. InstallShield supports this in Basic MSI projects, but they didn't back port it to the InstallScript architecture which is much older than Windows Installer.