Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Post Reply
reeset
Posts: 6
Joined: Fri Aug 02, 2019 5:00 am

Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Post by reeset » Fri Aug 02, 2019 5:13 am

I'm sure this is something that has been covered before, but I'm not finding it on the board. Here's my problem.

I've been using Visual Studio's Installer Project (or a version of it) for almost 20 years. I've extended my needs through custom actions and hacking the msi tables directly with vbscripts integrated into the build process -- but the process is simply getting too time consuming and I was looking to simplify the process. For my project, I have 4 installers:
* 2 32-bit installers -- one for admin and one for non-admin users (different product codes)
* 2 64-bit installers -- one for admin and one for non-admin users (different product codes)

The product codes are different because I work at a large university and we run into programs that differentiate by bit and keep the same product code which causes all kinds of problems when trying to manage updates through SCCM.

What I'm not understanding is how to transition these installations from 4 builds to 2 (one 32/64 bit user install and one 32/64 bit admin install). I've been building a test installer. I use the same product code and upgrade code from one of my previous msi's. In the Visual Studio Installer Project, in order to remove a previous version -- you had to maintain the same product code, but change the update code each time the version number changes. When I try this same approach with AI, this doesn't give me the desired result (I get an error telling me a current version is installed and I need to remove it). In AI, it seems that I need to change the product code and maintain the Upgrade code -- and that is my problem. I have around 50,000 versions of this program floating around and when I push updates (weekly, so changing just the build number, i.e. 7.0.[x]) I'm going to need this transition to be completely transparent.

I'm realizing that I'm misunderstanding something in the process, and I'm wondering if someone can help me understand the differences between the two systems so I can start working out a way to make this transition because there is a lot of stuff in AI that really would make my workflows better.

Thank you,

--tr

Daniel
Posts: 8163
Joined: Mon Apr 02, 2012 1:11 pm
Contact:

Re: Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Post by Daniel » Fri Aug 02, 2019 1:16 pm

Hello and welcome to our forums,

Thank you for giving Advanced Installer a trial.

Most likely this happens because you are preserving the same ProductCode for the new version of your installers. Please note that when you build a new version of your installer you should preserve only the UpgradeCode and choose to generate a new ProductCode. This way the new version of your setup will automatically upgrade the previous versions.

So, long story short, could you just make sure you set a different ProductCode for the new version installers and see how this works?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

reeset
Posts: 6
Joined: Fri Aug 02, 2019 5:00 am

Re: Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Post by reeset » Fri Aug 02, 2019 2:29 pm

Thank you Daniel,

So, I did see that is how AI is doing this, but its not how Visual Studio Installer works. And I have tens of thousands of installs in the field, that make up a number of vial workflow components for academic institutions. When I cut over, this has to be seemless. In the Visual Studio project world -- the product code only changed on major updates, the update code changed for each minor update. So, the only thing in-common between the various installs is the product code. So, if I'm to make this transition work -- I need my AI installer to see the product code and remove the version (regardless of the update code because it won't match -- for the current version -- there have been ~150 builds -- each with the same product code, but a different update code.)

Thanks,

--tr

Daniel
Posts: 8163
Joined: Mon Apr 02, 2012 1:11 pm
Contact:

Re: Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Post by Daniel » Tue Aug 06, 2019 1:00 pm

Hello,

If you did built MSI packages using your old Vsiual Studio approach then they should have used same UpgradeCode for each different version. Could you please check on this? If this is the case then to make sure all of your old version are uninstalled when installing the current setup package, then you should just use the same UpgardeCode for your current setup package and a higher product version.

Please note that by UpgradeCode I refer to the UpgradeCode Windows Installer property that should be set to the same GUID value for all version of the same product.

If you still want to force the uninstall of your old product by identifying it only through the ProductCode property, then you could simply try to create your own custom action that will run an uninstall command like this:

msiexec /x {ProductCode}

where the {ProductCode} is the guid of your old versions ProductCode.

Hope this helps.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

reeset
Posts: 6
Joined: Fri Aug 02, 2019 5:00 am

Re: Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Post by reeset » Tue Aug 06, 2019 2:58 pm

Hi Daniel,

>>they should have used same UpgradeCode for each different version

They do not. When a minor version or build number occurs, the tool changes the upgrade code and keeps the product code the same. This is my problem. I was looking at potentially adding ever upgradecode to the upgrades list -- it would be almost 900 between the two versions over 2 years, but I have the legacy msi's. But this is my problem -- the model the Visual Studio Extension uses is that the Product code remains static, and the UpgradeCode changes on revision.

>>If you still want to force the uninstall of your old product by identifying it only through the ProductCode property

In AI, which action would that be attached to because this would have to happen prior to installing the new version of the software and I don't believe I can have two msi operations occurring at once.

Thanks,

--tr

Daniel
Posts: 8163
Joined: Mon Apr 02, 2012 1:11 pm
Contact:

Re: Transitioning from a Visual Studio Installer Project to AI and I'm not understanding versioning

Post by Daniel » Mon Aug 12, 2019 11:41 am

Hello,

You have two sequence options to implement such uninstall custom action:

1. during "Wizard Dialogs Stage", but this means you will have to run only with full UI your updates setup package in order to uninstall the old one - this is because the actions scheduled during "Wizard Dialogs Stage" are executed only when the setup package is run with full UI

2. during "Install Execution Stage" scheduled after "Finish Execution" action group; at this stage the custom action must have the "Wait for custom action to finish before proceeding" and "Wait for return code at the end of the sequence" execution options unchecked so it runs asynchronously and do not overlap with the main installation process

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Post Reply