In your code, the upgrade code of the product element does not match the Id of the upgrade element.
The Id of the upgrade element determines which products will be detected. Make sure that the upgrade element's Id is the same as the upgrade code of the product. It is valid to have multiple upgrade elements if you need to detect more than one upgrade code. -----Original Message----- From: Thomas Due [mailto:thomas....@scanvaegt.dk] Sent: 10 November 2009 11:38 To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Problems with major upgrade I know this has been asked and answered about a zillion times and that I probably can find the information somewhere on the mailing list. The problem is I don't know how to limit my search, so I get roughly 1500 hits. It's like searching for the proverbial needle in a haystack. I try to do it exactly it says in the WiX help file, but it doesn't seem to work like I want. It is probably something simple, but I can't see it. What I want is an installer that automatically uninstalls a previous version of the same product and installs the new version. In addition it should detect whether a newer version already exists, and if so abort the installation. In other words, no downgrading. But for some reason, I just get two versions of the same product installed in the same folder. Mind you, this is the first version, so although there is nothing to upgrade yet, I would like the logic to be in place before shipping. My WiX is like this (the relevant bits): <?define MinVersion="1.0.0" ?> <?define MaxVersion="1.0.1" ?> <?define CurVersion="1.0.1" ?> <Product Id="*" Name="!(loc.ApplicationName)" Language="!(loc.ProductLanguage)" Version="$(var.CurVersion)" Manufacturer="!(loc.CompanyName)" Codepage="1252" UpgradeCode="DC776FD7-DF88-4F7F-A241-6F9233C2A997"> <Package Platform="x86" Manufacturer="!(loc.CompanyName)" InstallPrivileges="elevated" Description="!(loc.PackageDescription)" InstallScope="perMachine" InstallerVersion="301" Compressed="yes" /> <Upgrade Id="214E215F-7633-421E-A7D8-FD5DB5992709" > <UpgradeVersion Minimum="$(var.MinVersion)" Maximum="$(var.MaxVersion)" IncludeMinimum="yes" Property="MYAPPVERSION" /> <UpgradeVersion Minimum="$(var.MaxVersion)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> </Upgrade> <InstallUISequence> <LaunchConditions After="AppSearch"/> </InstallUISequence> <InstallExecuteSequence> <RemoveExistingProducts After="InstallInitialize"/> <LaunchConditions After="AppSearch"/> </InstallExecuteSequence> <!-- Irrelevant stuff here --> </Product> I plan to simply change the CurVersion and MaxVersion variables between releases, so I don't have to change several entries and risk missing one. Best regards, Thomas Due ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users