How do I upgrade without uninstalling old features? - 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!

Warrigal
Posts: 43
Joined: Thu Jun 26, 2008 8:20 am

How do I upgrade without uninstalling old features?

Here is a simplified description of my problem. When a customer bought our software, they used to get 4 products called A, B, C and D. Each product was optional and each was installed as a feature.

From now on, they will get only A and B. If they want C and D, they have to buy them separately.

So, I now have to build 2 new installers that must work as follows when doing an upgrade:
- New installer 1 must install A and/or B without uninstalling C and/or D.
- New installer 2 must install C and/or D without uninstalling A and/or B.

What's the best way to do this?
Warrigal
Posts: 43
Joined: Thu Jun 26, 2008 8:20 am

Re: How do I upgrade without uninstalling old features?

Any thoughts on this? I'm pretty desperate. My boss wanted the installer finished last week and I haven't even started it yet. (Software was late, of course.) I've thought of:
- 2 new installers with new upgrade codes
- allowing side-by-side installation
- copying the files that aren't to be touched to a temporary folder, doing the upgrade, then copying the files back after they've been uninstalled
- detecting the old features that aren't to be uninstalled and leaving them alone by changing the install sequence
- detecting the old features that aren't to be uninstalled and re-installing them with the new installer after they've been removed

Because of the urgency, I don't have time to experiment.

I'm sure I've seen a thread about this on the forum, but I can't find it because every search term I think of is disallowed by the search engine because the terms are too common.

HELP!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How do I upgrade without uninstalling old features?

Hello,

You can try the following:
- create an installer for AB that will upgrade ABCD. This will of course uninstall CD along with AB.
- this installer will detect if CD is installed and if it was, launch the installer for CD also, after the installation for AB finished.

Let me know how this works for you.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Warrigal
Posts: 43
Joined: Thu Jun 26, 2008 8:20 am

Re: How do I upgrade without uninstalling old features?

Thanks Gabriel, but this won't work as it uninstalls the old C and D. Once uninstalled, there is no way of reinstalling it. The installer for the new C and D is purchased separately and shipped on a different CD. Please read the requirements again. The old C and D must not be uninstalled. That's the whole point.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

How to split a product

Hello,

I am attaching a sample project that demonstrates how to split a product in two.
The CD product instructs the ABCD installer to uninstall its CD features after the new CD product installs itself. This is done with the help of a bat file placed in the InstallFinalize step of CD. Note the call to msiexec using ABCD's product code.

Best regards,
Gabriel
Attachments
ProductSplit.zip
(740 KiB) Downloaded 373 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Warrigal
Posts: 43
Joined: Thu Jun 26, 2008 8:20 am

Re: How do I upgrade without uninstalling old features?

Thanks Gabriel,

I've downloaded the zip file, tried the sample installers and everything seemed to work fine. I created another installer for AB and it also worked fine. The secret is to use a new UpgradeCode for the two new installers and to use the REMOVE property in the command line of each of the batch files.

After running ABCD, then CD, then AB, the original ABCD was removed from Add or Remove Programs - quite to my surprise - even though I had not explicitly uninstalled it. This is a nice side effect. Unfortunately, a lot of junk was left behind in the ARP cache in the Windows registry. Any idea how to avoid this?

Also, is there a way to do the upgrade without uninstalling certain features without using the batch file method? I'm sure I read about this somewhere on the forum a year or so ago.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How do I upgrade without uninstalling old features?

Hello,
After running ABCD, then CD, then AB, the original ABCD was removed from Add or Remove Programs - quite to my surprise - even though I had not explicitly uninstalled it. This is a nice side effect. Unfortunately, a lot of junk was left behind in the ARP cache in the Windows registry. Any idea how to avoid this?
I am not sure what you mean by junk. Could you give me more details about this?
Also, is there a way to do the upgrade without uninstalling certain features without using the batch file method? I'm sure I read about this somewhere on the forum a year or so ago.
You could create your own executable or some other launcher that would launch msiexec with the appropriate parameters for removing the features from ABCD.
The basic reason why the .bat was used was because the main msiexec process(running our AB or CD installer) had to finish before launching again for ABCD. As you may already know, two Windows Installer instances can not run at the same time.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”