FYI dblock posted http://code.dblock.org/ShowPost.aspx?id=101 on this list a few times recently which covers this & other similar conditions. I would recommend using the code on that post.
Palbinder Sandher Software Deployment & IT Administrator T: +44 (0) 141 945 8500 F: +44 (0) 141 945 8501 http://www.iesve.com **Design, Simulate + Innovate with the <Virtual Environment>** Integrated Environmental Solutions Limited. Registered in Scotland No. SC151456 Registered Office - Helix Building, West Of Scotland Science Park, Glasgow G20 0SP Email Disclaimer -----Original Message----- From: Sanjay Rao [mailto:s...@noida.interrasystems.com] Sent: 29 June 2010 06:15 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] CustomAction on Uninstall but not upgrade use condition (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL") cge wrote: > I have a custom action that should only run on uninstall, but not run > during an upgrade. After browsing the list archives and other sites, I > came up with the following: > > <Custom Action='SetUnDeployParams' > After='MsiUnpublishAssemblies'>Installed AND (REMOVE="ALL") AND NOT > (UPGRADEFOUND OR UPGRADINGPRODUCTCODE)</Custom> > <Custom Action='UnDeploy' After='SetUnDeployParams'>Installed > AND > (REMOVE="ALL") AND NOT (UPGRADEFOUND OR UPGRADINGPRODUCTCODE)</Custom> > > > But the action is still being run during an upgrade. I can't figure > out why, given these log exerpts: > > MSI (c) (AC:34) [13:59:18:455]: Doing action: FindRelatedProducts > Action 13:59:18: FindRelatedProducts. Searching for related > applications Action start 13:59:18: FindRelatedProducts. > FindRelatedProducts: Found application: > {4EBE949A-5DEE-11DF-A3C0-4BE0DED72085} > MSI (c) (AC:34) [13:59:18:455]: PROPERTY CHANGE: Adding UPGRADEFOUND > property. Its value is '{4EBE949A-5DEE-11DF-A3C0-4BE0DED72085}'. > Action ended 13:59:18: FindRelatedProducts. Return value 1. > ... > MSI (s) (18:C0) [13:59:21:267]: PROPERTY CHANGE: Adding > UPGRADINGPRODUCTCODE property. Its value is '{C17B34D1-C56E-4BD7-8E2F-D20B06902E17}'. > ... > Action ended 13:59:21: MsiUnpublishAssemblies. Return value 0. > MSI (s) (18:C0) [13:59:21:314]: Doing action: SetUnDeployParams Action > 13:59:21: SetUnDeployParams. > Action start 13:59:21: SetUnDeployParams. > > > > ------------------------------------------------------------------------ ------ 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