Struggling with Backup and Restore - Advanced Installer Community
karlwj
Posts: 5
Joined: Fri Jan 27, 2012 9:14 pm

Struggling with Backup and Restore

We're using version 6.9 due to a specific bug that we consider a feature. I recently added the Preserve File on Install functionality as instructed in the article http://www.advancedinstaller.com/user-g ... le-ca.html. I am calling your VBS script and setup a test file to install>backup>restore. The process has me scratching my head and I was hoping to get your feedback.

Before going any further, I also built the p2.aip sample and experienced similar behavior with the test files. So, either I don't understand how the process should work OR I am dealing with a problem within AIP. I never see a temporary folder get created in c:\users\name\AppData\Local\Temp , and searching the HD does not reveal a backup copy of my files. When I run the RUN AND LOG feature, it shows me the path of the temp folder, but in reality it's never created....

Here is WHAT I EXPECT TO HAPPEN:
Build an MSI that includes the custom actions and vbs script. It is told to preserve a sample.txt file I place in APPDIR.
Install, confirm my sample.txt exists
Modify sample.txt with some text.
Uninstall my product.
Reinstall my product.
Expect to see my original sample.txt or some evidence of a backup

Here is WHAT I SEE HAPPEN:

Follow process listed above. New sample.txt is created; changes not preserved.

Other questions: where does it put the backedup data if I don't specify a path?

Many thanks in advance,
-Karl

Oh and I also went through this whole forum looking for answers: http://www.advancedinstaller.com/forums ... ore#p30138
karlwj
Posts: 5
Joined: Fri Jan 27, 2012 9:14 pm

Re: Struggling with Backup and Restore

I sort of made it work to a degree, but this raised more questions that in answered.

I commented out the VBScript portion that deletes the folder, and that helped me see when it is saving files. It looks like the only time the feature is remotely functional is when doing an upgrade. For example, I run installer > then update the AIP to 2.0.1 > then run the installer again and viola, settings are backed up during upgrade.

I need it to
1) safeguard files when being uninstalled/removed. Basically, our upgrade process is often done by user removing software and installing new version.
2) safeguard files when an upgrade is done.
3) restore during upgrade
4) restore when a clean install is done and backup files exist (obviously some cases there will be no backup files because my installer has not made backups in the past).

Seems like 2 and 3 are somewhat viable but 1 and 4 I really have no idea how to deal with. Obviously dealing with issues like knowing where the PREVIOUS installation was dropped into, knowing a location of a backup folder (which really could be done via hard-coding the folder, not overwriting files but maintaining a history in case someone runs the installer more than once.. etc..

Any advice is most welcome..
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Struggling with Backup and Restore

As I already replied in my email and I see you have realized too the article written by us is designed only for upgrades.

For simple uninstall processes you can try to modify our scripts, and their execution moments, so they save the files and restore them as desired. You will also
need to save the value of the properties used into registry and get them back using searches, as in this case you will be executing the save an restore custom actions from different installation processes, so the properties will loose their values.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”