shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Retaining the user data during the repair

I have a product in which I have a folder \softphone\userdata. This folder basically stores the user data.
During the repair this folder is being overwritten by the installer. Instead, I would like to retain this folder and contents as it is. Is this possible?
Note: During the uninstall this folder also needs to be deleted.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Retaining the user data during the repair

Hi Rohan,

By default Advanced Installer does not overwrite existing files with the same name during maintenance. So, your "userdata" folder and its content shouldn't be overwritten during repair.

Can you please give us more details about your scenario (maybe exemplify)?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Retaining the user data during the repair

Steps to reproduce(it might be happening because of my changes)
1) My product creates the "user data files" inside \softphone\userdata. During the uninstall, I guess (if there are any files created by the application like user files))default installer does not delete the root folder(i.e Application folder)
2) To take care of this, I have changed the folder properties(for the application folder)
Remove folder -> Checked
Operation->always remove folder(even if it not empty)
Component->AI_Exe Path
Remove On->Component uninstall
Condition -> (AI_CLEAN_RESOURCES_UNINSTALL = "1") AND (NOT UPGRADINGPRODUCTCODE)
3) Now if I uninstall all the folders are deleted.
4) Repair, also behaves like uninstall an install, which deletes all the user data(which I would like to avoid)
Do let me know if this explains the problem. If not, I could send you the sample .aip file, using which you could reproduce this problem easily.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Retaining the user data during the repair

In order to achieve what you want you can take a look on the How do I prevent a file or registry entry from being uninstalled or repaired and Folder Operations Tab articles.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Retaining the user data during the repair

Thanks for the information.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Retaining the user data during the repair

You're welcome. My pleasure.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”