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