Rachit
Posts: 1
Joined: Tue Jan 22, 2019 7:03 am

Upgrade appx version using advanced installer by creating a backup and then restoring from it

Tue Jan 22, 2019 7:11 am

Hi,
I have created a exe package with advanced installer which installs and uninstalls appx package.
I have a situation where i want to create backup of the data if the app already exists during upgrade scenario and later restore all the files and folders
I used a shell script for the same but the application is still not being backed up, Is there any other way to create a backup and restore of external folder?
Also the steps have been kept as follows, the backup script is called during upgrade option that exists inside the uninstall.
While the restore script is such that it checks if the app backup folder exists and if exists it moves the folder to another location
The restore script is called at the install time.
Please reply asap it is a production issue

Regards
Rachit

Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Upgrade appx version using advanced installer by creating a backup and then restoring from it

Wed Jan 23, 2019 9:39 am

Hi Rachit,

For APPX/MSIX packages the app user data is migrated/preserved automatically by the OS when you install a new version of the package, as long as the new version has the same package identity(eg/ "YourApplication.YourCompany") as the old version.

All you have to do is to run the new APPX (without uninstall the old version), the OS will see it is a new version and install it as an upgrade for the existing app.

In this case, you don't need to reinvent the wheel and manually perform the backup and restore.

Have you tried installing the new package directly, to see if the OS preserves the user data?

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

Return to “Common Problems”