LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does CVI uninstall a previous application (without asking) while installing an update?

CVI keeps uninstalling a previous installation even if the path for the new install is different.  I've searched for a checkbox or some kind of setting to stop this without success.  Why does it do this and how do I prevent it?
0 Kudos
Message 1 of 7
(3,716 Views)
CVI (or at least the installer) thinks you are up-issuing the software and has decided you don't need the previous issue. If this is not the case, and you do need to keep the previous version, you should be able to manage this by (on my CVI 7.0) clicking the "Generate New GUID" button, on the Advanced tab of the Create Distribution Kit form, from the Build menu item. This effectively tells CVI that the software is completely new and to treat it as a different package.
 
JR
0 Kudos
Message 2 of 7
(3,712 Views)
As JR said, Windows Installers use the GUID as an ID to indicate whether two installations are the same product.  The Windows Installer framework is designed to ugrade an existing installation of the same product (based on their version numbers).  Thus, if you want side-by-side installations, you need to make a "different" product by changing the product GUID. 

If you are using CVI 8.0, then there is no way to manually change the GUID through the UI.  Each time you create a new distribution (from "New..." on the manage distributions dialog), it gets a new, unique product GUID.  To have side-by-side installation behavior, you will need to create a new distribution, but you can use the "Copy settings from existing file" option on the New Distribution dialog to effectively clone the original.  This also has the added benefit of allowing you to rebuild older versions if you ever need to fix bugs or provide maintenance releases.

Hope this helps.

Mert A.
National Instruments
Message 3 of 7
(3,702 Views)

All this is good info, except that I have version 6.  Any jewels of wisdom for version 6?

Also, I usually change the rev numbers in all the places:

                        Product Version, File Version, Internal Name, Product Version

I don't see any reference to GUID.  Is it available to modify? 

0 Kudos
Message 4 of 7
(3,694 Views)
Well, I'm not sure it's a jewel per se, but I do have a solution for you.  You'll need to manually edit your prj file, replacing the Distribution Kit GUID found under [Distribution Kit] with a new one each time you want a new side-by-side revision.  Now, it's a bad idea to just make up a GUID, so you'll need to use a guid generator.  If you have MS Visual Studio installed, then you should already have Microsoft's guidgen.exe tool.  Otherwise, you can readily find guid generators by doing a quick web search (here is one that claims to be equivalent to the MS tool).

If you ever anticipate having to provide upgrades for older versions, I suggest you save off the original GUID somewhere safe before you replace it with the new one.

Hope this helps.

Mert A.
National Instruments
0 Kudos
Message 5 of 7
(3,689 Views)

Mert, it sound good for a fallback method.  But, that is alot of additional steps to remember when releasing an upgrade.  I think my predecessor just published a new UIR and EXE file, since there was only one major release to deal with, whereas I now have 3.  Isn't there some facility within version 6 to deal with this?  I surely can't be the only one who has noticed this.

 

PC

0 Kudos
Message 6 of 7
(3,685 Views)
I'm quite sure you're not the only one who noticed this, which is why we provided the ability to change the GUID at the touch of a button in CVI 7.0.

I am curious how you maintain your 3 versions.  Since your original problem was that your distributions upgraded instead of installing sxs, I assume you have one project for all 3 versions.  If you have a different project file for each major release of your application, you would automatically get sxs installation behavior.   This might be a good option for you.

Assuming you just have one project and you had to rebuild an older version of your app, you presumably would have to temporarily replace some files in your project (or some similar work) with older versions.  The only additional work needed to support sxs installs is to replace the GUID in your prj file with the one for the older version.  You do not need to generate a new GUID each time you build, just the first time you create a new major release.  I realize this is still more cumbersome than it could be, which is why we have made improvements in newer versions.  For instance, in CVI 8.0, you can have multiple distributions in your workspace -- perhaps one for each version of your product, whether you have one project or many.

If your predecessor only had one release to deal with, the upgrade vs. sxs issue never even came into the picture, so of course he never had to mess around with the distribution GUID.

I hope this gives you some ideas.  If you have more questions, I'd be happy to help however I can.

Mert A.
National Instruments
Message 7 of 7
(3,679 Views)