/build/static/layout/Breadcrumb_cap_w.png

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.

0 Comments   [ + ] Show comments

Answers (5)

Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
4
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)![;)]
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
It's down to how you design your packages. You can design a package to automatically "upgrade" from a previous version if one is installed.

In this case, the command would be something simple like: "Msiexec /i Package.msi /qb".
Posted by: director 19 years ago
Yellow Belt
0
I appreciate your response.

Can you give me some additional information about how to design the MSI package to enable us to use one command line for upgrade or install?

Thanks,
Posted by: plangton 19 years ago
Second Degree Blue Belt
0
Hi WiseUser,

Thats a great post (and yep I rated it), the most comprehensive summary of that I've seen, though I already do what these documents describe its nice to have all those links in one place - much appreciated.

Rgds

Paul
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
Thanks Paul!

I rated one of yours too ("Procexpnt" - my favourite Sysinternals tool). I also love the feature that allows you to search for files and find out which process is currently using them.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ