Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

How to restore original files if there are error in OnUpdateUIAfter

I have an InstallScript 2009 project.
In the OnUpdateUIAfter function I have codes that handle my database.
In event of errors inside OnUpdateUIAfter, I want to abort setup but I see that when I call abort files are not restored with the previous (that is the files installed before setup-update)!

What can I do?

Labels (1)
0 Kudos
(1) Reply
Level 10 Flexeran
Level 10 Flexeran

You could back up any files that will be replaced/modified and then restore them in the OnAbort event. Outside of this, there isn't really any way to roll back resources with InstallScript projects. You may want to look at a Basic MSI project in the future as Windows Installer provides rollback support as standard functionality.
0 Kudos