MSI syntax for install/upgrade - one command
We have over 3000 users to deploy software to. It is not possible to know in advance of advertising the package whether or not an earlier version of the software is installed. So we'd like to use one MSI command line that will upgrade the software to the current version (if an earlier version of it is already installed), or install the sofware (if no earlier version is found, or if the software was uninstalled).
Does anyone know the correct syntax to use in an MSI command line that will both install or upgrade?
I know that we can use one command line with EXE to do both upgrades or installs. We would like to use one command line with MSI to do both.
Does anyone know the correct syntax to use in an MSI command line that will both install or upgrade?
I know that we can use one command line with EXE to do both upgrades or installs. We would like to use one command line with MSI to do both.
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
WiseUser
19 years ago
Obviously, this information only applies to MSI packages that you create yourself - you have no control over the design of vendor MSI packages.
This link summarises what I'm referring to:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/applying_major_upgrades_by_installing_the_product.asp
The easiest way to demonstrate what I'm talking about is as follows:
1) Include an "UpgradeCode" property in your first package. See the following links for information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgradecode.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/using_an_upgradecode.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/preparing_an_application_for_future_major_upgrades.asp
2) Configure your upgrade package as a major upgrade. See here for information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/patching_and_upgrades.asp
3) Configure your upgrade package as a related package through the "Upgrade" table. See here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgrade_table.asp
4) Follow all the Windows Installer rules when designing your upgrade (eg: keep component GUIDS the same, and don't add new resources to an existing component). There are tools which can help you with this, such as Wise's "Upgrade Sync" tool. If in doubt, you can resequence the "RemoveExistingProducts" action in order to remove the old version first - see here for details:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/removeexistingproducts_action.asp
I hope this is useful, and not too confusing - please come back and let us know (and don't forget to rate my posts if they were helpful)![;)]
This link summarises what I'm referring to:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/applying_major_upgrades_by_installing_the_product.asp
The easiest way to demonstrate what I'm talking about is as follows:
1) Include an "UpgradeCode" property in your first package. See the following links for information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgradecode.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/using_an_upgradecode.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/preparing_an_application_for_future_major_upgrades.asp
2) Configure your upgrade package as a major upgrade. See here for information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/patching_and_upgrades.asp
3) Configure your upgrade package as a related package through the "Upgrade" table. See here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgrade_table.asp
4) Follow all the Windows Installer rules when designing your upgrade (eg: keep component GUIDS the same, and don't add new resources to an existing component). There are tools which can help you with this, such as Wise's "Upgrade Sync" tool. If in doubt, you can resequence the "RemoveExistingProducts" action in order to remove the old version first - see here for details:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/removeexistingproducts_action.asp
I hope this is useful, and not too confusing - please come back and let us know (and don't forget to rate my posts if they were helpful)![;)]
Posted by:
WiseUser
19 years ago
Posted by:
director
19 years ago
Posted by:
plangton
19 years ago
Posted by:
WiseUser
19 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.