Backup and restoring the files - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Backup and restoring the files

Hi Support,

My question is regarding the backup and restoring the files. I have used the vbscript given in the following article:
http://www.advancedinstaller.com/user-g ... le-ca.html.

My issue is that I want to take a backup of the files in to temporary directory during the installation time and restore it to a particular location during uninstallation time. According to the article, I am able to restore the file only during the installation but not at uninstall time.

Could you please help me out in doing this?

Thanks
Soni
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi Soni,

There is no limitation for these custom actions. You can use them whenever you need. If you want to restore the files during uninstall, simply condition the restore custom action with:

Code: Select all

REMOVE="ALL"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi Cosmin,

Thank you for the information.

I have used the REMOVE "ALL" condition for restore custom actions but the files are not getting restored.. Need your help urgently...

Regards
Soni
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi Soni,

Can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi Cosmin,

Uploaded the .aip file(TestSample.aip) as an attachment. I look forward to hear back from you soon.

Thanks!
Sony
Attachments
TestSample.aip
(28.01 KiB) Downloaded 580 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi,

Try moving the restore custom action under "InstallExecuteSequence" -> "Commit". Also, make sure it runs as "Commit with no impersonation". This way it will run under the local system account with full administrator privileges.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi Cosmin,

I have followed your suggestions but no luck. :(

The folder is not getting restored during uninstallation.. Any other suggestion?

Thanks!
Sony
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi Sony,

Since the restore custom action is running during uninstall, the original "tfolder" and "BackupList" property values are lost. For the custom action which sets BackupList property you can remove the condition so its always set.

For tFolder property you can try this:
- in the Registry page create a registry entry which contains the tFolder property
- create a search for this registry entry
- right before the restore custom action create a Property set with formatted custom action which sets tFolder to the search property value
- condition this action to run only during uninstall

This way tFolder is saved in the registry during install and retrieved by the search during uninstall.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi Cosmin,

I am unable to implement your suggestions. Could you please update your suggestions in the sample that I have sent to you and revert it back to me. It will be very helpful...

Thanks!
Sony
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi Cosmin,

Waiting for your sample?

Thanks!
Sony
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi,

I attached the modified sample project.

Regards,
Cosmin
Attachments
TestSample.aip
(28.79 KiB) Downloaded 611 times
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi,

Thanks alot for providing the sample.

I have tested the sample that you have provided. The backup location is getting stored in the registry successfully and I have conditioned the restore custom actions to run during the uninstall.. But the files are not getting restored.

Any other suggestion???

Thanks!
Sony
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi,

Can you please send us a verbose log of the uninstall process to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sony
Posts: 134
Joined: Wed Apr 07, 2010 9:55 am

Re: Backup and restoring the files

Hi,

Please find the uninstall log in the attachment.

Regards
Sony
Attachments
testsampleuninstalllog.log
(148.97 KiB) Downloaded 660 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup and restoring the files

Hi,

Please change the condition for all restore custom actions under InstallFinalize to:

Code: Select all

REMOVE = "ALL"
Currently the custom actions are skipped during an uninstall.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”