lambert2
Posts: 4
Joined: Tue Sep 20, 2005 4:44 am

Rollback overwritten file

Hi There,

When I run the installer package I overwrite any existing files in the output dir with the same file name. Hence updating the any files with new current info ect. This all works fine.

ex: overwrite c:/pups/dog.txt 32kb with c:/pups/dog.txt 89kb

If I now uninstall that same package It does not rollback to the old file it simply removes the current one leaving nothing.

ex: c:/pups/

What I wish to happen is a rollback to the overwritten file dog.txt 32kb apoun uninstall.

Does anyone know if this is possible?

Many Thanks,

Lambert
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

The old files cannot be placed back after the uninstall because they no longer exist. The install process had overwritten them.

If you want to revert to the old files after the package is uninstalled, you can schedule two custom actions: one to copy the existing files to another location during the installation and the other one to copy them back during the uninstall process.

Be sure to schedule the first custom action before the files from the package are deployed. For example you can place it on the "InstallUISequence".

These custom actions can be of VBScript type.

For more information on custom actions please visit:
http://www.advancedinstaller.com/user-g ... rties.html

All the best,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
lambert2
Posts: 4
Joined: Tue Sep 20, 2005 4:44 am

Thanks Allot that worked well! :D

Return to “Common Problems”