Upgrade Install, preserve files, not included in upgrade.. - 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!

JaedenRuiner
Posts: 12
Joined: Thu Apr 01, 2010 4:12 am

Upgrade Install, preserve files, not included in upgrade..

So,
I have an installation package that is rather large. As time has progressed I have made some updates to the "engine" aspect of the application, but the primary "data" the engine works with has remained the same. I have written other scripts in Advanced Installer which find an "installed" file, preserve it, run the 'remove/reinstall' process, and then restores the preserved copy of the file. Very helpful in say database files for a .Net application, which the data has been altered during use, but the executable has be updated and thus we don't want to "delete" the database file, while we still wish to perform an update on the executable.

That is simple enough for a installation package that contains "all" the files. However, I am dealing now with a process of wanting to create a "small" update package. There are say, 10 files in my original installation, and currently I only wish to update 1 of those files. the other 9 constitutes some 70 odd megabytes of data which have not been changed from version 1 to version 1.1. Thus I would like to have the Update installation package be the mere 300 kb of the 1 file that needs to be replaced, while retaining the other ten that exist already installed by version 1.0.

How might I do this? Currently, By creating a new package, it would install a whole new installation, as well, re-using the 1.0 package would incorporate all 73 mb of data. I only want to update 1 file and leave the other 9 alone as part of the same installation.
Is this possible? Other Suggestions on how to achieve this?
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade Install, preserve files, not included in upgrade..

Hello Jaeden,

You can create a patch project which will contain only the modifications of the new version from the old version. To see the difference between a major upgrade an a patch please follow this link.
Here is the tutorial that can help you understand how to create a patch.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JaedenRuiner
Posts: 12
Joined: Thu Apr 01, 2010 4:12 am

Re: Upgrade Install, preserve files, not included in upgrade..

Thank you for your quick response.
I have looked over the general concept of the "patch" at it appears to take two MSI databases and compares them for differences.
So, first off, the installation I'm working on is for a Game MODification install. I have version 0.9.5 of the full installation of the game MOD. THis works just fine. I then proceed to update the "Product Version" on the "Produce Details" page, to 0.9.6. of all the files one PK3 file is different.
Original: 2,514 kb, compiled Nov 20, 2010 at 4:10.
Update: 2,516 kb, compiled Feb 12, 2011 at 3:32
I also added an additional TXT file in the 0.9.6 msi package which describes the fixes made to the MOD.

I then built the 0.9.6 MSI package and it appeared to compile just fine.
I proceeded to make a Patch Package, as the tutorial you pointed to instructs, and selected the 0.9.6 msi (of 75mb) as the Upgraded image, and then proceeded to add the Target image as the 0.9.5 msi (of 74mb) as the Target Image.
In the Images Screen the listing MyMod_096 shows the Package path, with the Patch Package or Symbols Folder sections left blank. Beneath this on the tree is the MyMod_095, Ignore Missing Source is Unchecked, Default Language is Unchecked, Product must match and Upgrade Code must Match are both checked. Version Check is for Major, Minor, and Update, and relationship is installed = base. I Saved the patch project and then built it.
the resulting MSP was only 55kb, and after running the 0.9.5 install on my system, I proceed to run the MSP patch install, and there was no change in files on my harddrive. Both installations seemed to complete without any errors, but the pk3 files which should have been updated remained the exact same as the original 2,514 kb version of the file, and the Additional TXT file was not installed.

Ideas? reasons? Am I missing something?

[Edit]
I've proceeded further to change the Version check to be major and minor, which resulted in two files of the log showing modification/new. so the new TXT file was discovered between the MSI versions, and the modified PK3 file was discovered. The resulting MSP file is now 2.4 mb, as it should be. However, when I run it nothing happens. It runs through the install like the original MSI file does, (even asking for the Setup Type, typical, custom, complete) and it asks to "view readme" at the end of the installation. However, the View Readme doesn't show the readme from the previous installation (since that file wasn't modified) it just opens an explorer window, and the pk3 file is still the original version on the harddrive, the patch is not "applied"??
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
(PS: a PK3 is simple a ZIP file with renamed extension to work with the IDSoftware Quake3 engine)
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade Install, preserve files, not included in upgrade..

Hello Jaeden,

Please note that in order for a patch to work you must not change the Product Code when changing the product version.
Generally, a patch does not apply when one of the patch rules are broken. Please review your projects so you make sure the rules are kept.

After this, if your patch still doesn't work, please send us all the .AIPs (project) to support at advancedinstaller dot com so we can investigate them.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JaedenRuiner
Posts: 12
Joined: Thu Apr 01, 2010 4:12 am

Re: Upgrade Install, preserve files, not included in upgrade..

Interesting.

I was under the impression, by way of the AI interface, that when I alter the "Product Version", say from the aforementioned 0.9.5 to 0.9.6, the UI informs me that the Product code must be updated, in order for the Upgrade to be functional, and now with in-depth investigation it also warns that this prevents patch creation.
That being said, am I to understand the following:
  • Two Versions of the Install must be created: one with the same Product Code for Patch Creation, One with New Product Code for Upgrade
  • How might I retrieve the product code from the previous version's (0.9.5) MSI file in order to reset the Product Code of the 0.9.6 AIP so the patch will function
Thanks
J"SD"a'RR
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade Install, preserve files, not included in upgrade..

Hello,
How might I retrieve the product code from the previous version's (0.9.5) MSI file in order to reset the Product Code of the 0.9.6 AIP so the patch will function
In order to avoid any conflicts brought by any other changes you may have done from one version to another, the recommended way would be to recreate your 0.9.6 AIP by increasing the product version of the 0.9.5 AIP. This time just make sure you select "No" when prompted to change the product code.

You can retrieve the Product Code from the old MSI by opening the file with Orca.exe.
You can retrieve the Product Code from the old AIP from the Advanced Installer GUI by pressing Ctrl+P( menu bar -> "Project" -> "Options" ) and then navigating to the "Project ID's" tab.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”