nibb
Posts: 16
Joined: Sat Feb 12, 2011 11:44 pm

How to upgrade?

Im really having a hard time finding how to make upgrades to a installer.

I decided not to use the patch option and do like most people do, just installing the newer version on top of the old one.

The problem is I cannot find how to tell AI not to overwrite specific folder of files on upgrades.

It seems the option to "remove" certain folders and files on uninstall is there, but its says nothing about upgrades.

The default behavior is to remove old first then install new version, or the other way around. I have to use the first one because I need to punch the firewall on a first install.

Its doesnt matter actually which option you choose, I thought I would be as simple as this:

Tell AI to create a folder on install if it doesnt exists
If it exitsts overwrite it on new install
On upgrade dont overwrite it
On uninstall delete it

But it seems the options are just to simple or I cannot find how to do this.

Example, AI already uses the install path on upgrades, great about this one, just in case I already write the install path to a xml file. I also take some user input on a fist install which I also save to a xml config file.

The problem is this. Why in the world on upgrades do the user have to specify this option again. This is not correct. The correct way would be to tell AI to check if this XML files exists and read from there.

Or even simpler, just disabled that dialog on upgrades and not to overwrite specific files and folders on upgrades. Almost all apps today create files on the install folder when a user uses them. In my case of course it creates some databases and users settings. If this are gone on upgrades its like doing a fresh install from scratch. The correct procedure would be to just upgrade new files and ignore the specific files that where already modified by the user, and of course do not delete stuff created by the user, that means no by the install.

If someone can specify how to make upgrades I would really appreciate it, as today and for months I can only create a one installer. Im unable to upgrade installed versions because of this. I checked and checked the settings and nothing tells me options on upgrades, most options are on install and uninstall, nothing for upgrades.

The patching procedure is for small files and it actually looks more messy. I decided to upgrade the install because I also want to be able to use the auto upgrade feature eventually.
nibb
Posts: 16
Joined: Sat Feb 12, 2011 11:44 pm

Re: How to upgrade?

Also when I click the button "New" where it says upgrade I get a nasty like the image attached.
Attachments
Capture.PNG
Capture.PNG (61.81 KiB) Viewed 6274 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to upgrade?

Hello,

Here is are a couple of articles that should get you started with upgrades:
How do I upgrade an older version of the package?
Windows Installer Upgrades
Upgrades Page
Upgrade FAQ
Also when I click the button "New" where it says upgrade I get a nasty like the image attached.
If you mean in the Upgrades page press the File -> New... from the menu bar, then we cannot replicate the error. Can you please send us the .AIP that manifests this to support at advancedinstaller dot com so we can investigate it?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nibb
Posts: 16
Joined: Sat Feb 12, 2011 11:44 pm

Re: How to upgrade?

I have send you the file.

About the links you posted I think I read all of them before posting here.

Not a single one explains or tells what I asked. I know it replaces files, and this is what I want to avoid.

So basically the only way for AI to make an upgrade is to erase all files or replace them?

If this is true, then you cannot do anything that modifies files in a user systems as they always get reverted on each upgrade.

How do softwares like Skype, Winamp, or even your own AI to takes data that is already in the users system?

If I upgrade AI for example, it doesnt erase all my files and settings.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to upgrade?

Hello,
I have send you the file.
Unfortunately, we are unable to replicate the error on our test machines. Does it occur every time you navigate to the Upgrades page and select New... from the Files menu in the .AIP you sent?
Not a single one explains or tells what I asked. I know it replaces files, and this is what I want to avoid. So basically the only way for AI to make an upgrade is to erase all files or replace them?
Actually, this is the Windows Installer standard on major upgrades. You can read more here.
If this is true, then you cannot do anything that modifies files in a user systems as they always get reverted on each upgrade. How do softwares like Skype, Winamp, or even your own AI to takes data that is already in the users system?
For this purpose, you can preserve certain files or registry entries on the target machine. Here is the article that explains how to do it manually, or you can use our Persistent User Data wizard from the Wizards -> Resources menu. This wizard will allow you to specify which resources will be preserved in an upgrade or repair operation.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nibb
Posts: 16
Joined: Sat Feb 12, 2011 11:44 pm

Re: How to upgrade?

Ok, that article is more related to what I was asking.

So this are the options I was looking for, they are in the components, under Organization then.

The articles explains what I want to do and it actually says what im doing already "As a general idea, it is not recommended to use the installed file to store any user data. The best way would be for the application to create a new file that stores it. At the simplest form, this method would consist of simply creating a copy of the installed file and modifying that"

Im actually not storing anything on the files created by the installer, but for some reason they are gone after a uninstall. The files that hold user data are only install path and some other settings.

There are several options here in components, like "Permanent" and "Never overwrite"

I suppose this is what im looking for? Checking "Never overwrite" would not overwrite the file on future upgrades correct?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to upgrade?

Hi,

For what you need you can set both Permanent and Never Overwrite. This way the file is not removed by an uninstall and it's not overwritten by future versions.

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

Return to “Common Problems”