Any ideas on how to have a MSI check if a newer version is installed? My guess is you'd have to setup a custom action or property?

Thanks for any help you can provide.
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
You could use the Upgrade table and and make sure to use the msidbUpgradeAttributesOnlyDetect attribute bit.
Then use the <ActionProperty> property as a condition to stop the old version from being installed over a newer version.
Answered 02/27/2008 by: AngelD
Red Belt

Please log in to comment
0
Thanks for the reply. I can't get it to work and for the sake of discussion, let's assume we have App1.0 and App2.0. 2.0 will always remove 1.0. What I want is, when you install App1.0, it will not install if 2.0 is currently installed or basically only install itself or remove any previous versions. Doing what you said should accomplish this. How exactly would I take those steps? This is what I tried and it's not working:

- Kept upgrade codes between 1.0 and 2.0 the same, different product codes.
- Added a property called NEWERVERSIONFOUND to the 'SecureCustomProperties' property.
- Added 1.0 upgrade code to its own upgrade table. I set version min and max to 1.0. I then changed the 'Attributes' to 2. This sets the bit flag for msidbUpgradeAttributesOnlyDetect.
- Set the 'ActionProperty' to NEWERVERSIONFOUND.
- Created a condition in Execute Immediate with. If NEWVERSIONFOUND then Terminate Installation END

Installed 1.0, then 2.0. 2 removed 1. Installed 1 and it did not terminate installation.

Help!
Answered 02/27/2008 by: Zerg
Senior Yellow Belt

Please log in to comment
0
Answered 02/27/2008 by: AngelD
Red Belt

Please log in to comment
0
Awesome, thanks. I just found this too

http://msdn2.microsoft.com/en-us/library/aa370840(VS.85).aspx

It exists on the internet.. it's just a matter of correctly asking the question :)
Answered 02/27/2008 by: Zerg
Senior Yellow Belt

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