简体   繁体   中英

Microsoft Installer: can it upgrade a product without version number changes?

We want to use the popular major.minor.update.build_number versioning scheme. Our next product update will be version 1.0.1.

Our in-house Config Management mechanism produces Release builds and Daily builds, all of which are automatically packed as MSI's. Developers and QA regularly download builds and update test rigs with them to verify bug fixes etc.

Each CM build increments the build_number field, so build versions might look something like this

1.0.1.001 // Release build  
1.0.1.002 // Daily build  
1.0.1.003 // Another Daily build  
1.0.1.004 // New Release build  

Our problem is that, because our ProductVersion doesn't change, Microsoft's Installer technology won't let us run those MSI's as updates on our test rigs. We have to completely uninstall the existing product and reinstall the desired MSI.

Is there a way to author our MSI's to apply updates regardless of the ProductVersion stamp?

We use InstallShield. Is there an alternative installation technology that would allow us to do what we want?

Thanks!

You should be able to do a minor upgrade in this situation. If your goal is to do major upgrades, you should be changing one of the first three fields of the ProductVersion property.

If your goal is to swim upstream then you'll need a custom action inserted between FindRelatedProducts and RemoveExistingProducts to override MSI's built-in product detection logic. Basically you'll want to use the Msi API to find installed ProductCodes for your UpgradeCode.

Personally I reccomend

Major.Minor.Build.Patch so my incremented build sequence is

1.0.1.0 1.0.2.0 1.0.3.0 1.0.4.0 1.1.5.0 1.1.6.0 1.1.7.0

The .0 allows me flexibility to rebuild assemblies and ship them as patches if needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM