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