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   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


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".
Answered 02/18/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
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?

Answered 02/22/2005 by: director
Yellow Belt

Please log in to comment
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:


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:


2) Configure your upgrade package as a major upgrade. See here for information:


3) Configure your upgrade package as a related package through the "Upgrade" table. See here:


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:


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)![;)]
Answered 02/22/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
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.


Answered 02/22/2005 by: plangton
Second Degree Blue Belt

Please log in to comment
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.
Answered 02/23/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment