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

Custom action on Yes button event behaior on CancelSetup


1 reply to this topic

Dyerald

Dyerald
  • Members
  • 43 posts

Posted 23 October 2001 - 10:44

Hi,

I’m using IPWI 2.03 and I have a project that backup old files on a certain directory and will return these old files to its old location when the user cancel the installation and during uninstallation. So I made a function in a script that copies the old files on a certain directory and I also made a function that copies back the old files to their old location using XCopyFile function. I made a custom action  named ReturnOldFiles and put it on the CancelSetup dialog under Yes button behavior event before the DoAction (CleanUp) entry on it.

These are the entries on my custom action:
Event = DoAction
Argument = ReturnOldFiles
Condition = Not Installed

I just encountered 1 warning during building which is Warning –4095 and I ignored it. So during installation when I click the cancel button and then the Yes button on the CancelSetup dialog, the files were not returned on its old location. I checked the function, the directories and everything… all are correct. It doesn’t copy the files to the said old location. The XCopyFiles function fails to copy the files back. I also have this custom action inserted on the execute sequence after InstallFinalize and it work fine. I wonder why it doesn’t work on the CancelSetup dialog. Any idea why is this happening? Is there some other place where I could insert this custom action so that this bug will be avoided?

Pls. help I really need this on my project. I would be very grateful for any help you could give me. Thanks in advance.

Dyerald


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 October 2001 - 11:31

I would not put this on the cancel dialog (would be executed when setup aborts because of failure, or in silent mode). I would create a custom action of type "rollback" and insert it in the execute sequence. That's what rollback actions are for.