"The product id is set to a guid". I suppose based on that text that the ProductCode GUID doesn't change between the versions?
FindRelatedProducts and RemoveExistingProducts do not run during maintenance transactions. A maintenance transaction always runs when the ProductCode of the current package is already installed in the same scope (assuming that someone set the REINSTALL property). You have authored your upgrade/downgrade code in a "major upgrade" sort of way. You should use "*" for your produ...@id values unless you have explicit need to support minor upgrades (such as for patches). -----Original Message----- From: Bud594 [mailto:mjohn...@xenomorph.com] Sent: Wednesday, July 14, 2010 5:52 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Preventing downgrade of version Nothing like pressure, but my first Wix Install is being released to clients on friday and I am struggling to prevent a downgrade. The product id is set to a guid and the package id to *, the upgrade code it set to the parameter in the prodcut. The relevant code is below, I was expecting an error to be displayed if I tried to install version 4.0.0 on top of version 4.1.0 but I am getting no such error. I have run the install with verbose logging but can't find SELFFOUND or NEWERVERSIONINSTALLED being set, is that expected? As you can see this code has been adapted from the www.tramonta.co.hu tutorial, I have also done a search here and can't find anyone else with my particular issue(but of course my search criteria may be flawed) Can anyone point me in the right direction please? Yours in anticipation Martin <?define Version="4.0.0" ?> <?define UpgradeCode="d980bbaf-0f2d-43d7-9305-a7005225eaad"?> <Upgrade Id="$(var.UpgradeCode)"> <UpgradeVersion Property="SELFFOUND" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" /> <UpgradeVersion Property="NEWERVERSIONINSTALLED" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" /> </Upgrade> [...] <CustomAction Id="AlreadyUpdated" Error="Already Updated" /> <CustomAction Id="NoDowngrade" Error="NoDowngrade" /> <InstallExecuteSequence> <RemoveExistingProducts Before="InstallInitialize" /> <Custom Action='AlreadyUpdated' After='FindRelatedProducts'>SELFFOUND</Custom> <Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERVERSIONINSTALLED</Custom> -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Preventing-dow ngrade-of-version-tp5292363p5292363.html Sent from the wix-users mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users