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

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.

Answers

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

Please log in to comment
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,
Answered 02/22/2005 by: director
Yellow Belt

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

Please log in to comment
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
Answered 02/22/2005 by: plangton
Second Degree Blue Belt

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

Please log in to comment
Answer this question or Comment on this question for clarity