Hi Kim, It's cool! "NOT Installed AND NOT PREVIOUSFOUND" works! I changed the condition to it, then upgrade. This time MyCA is not called. Now I understand that the condition should match the property. Otherwise it won't work.
Cheers! Chunyan -----UrsprĂĽngliche Nachricht----- Von: Kim Gybels [mailto:kim.gyb...@metris.com] Gesendet: Donnerstag, 6. August 2009 10:02 An: General discussion for Windows Installer XML toolset. Betreff: Re: [WiX-users] WG: How to call Custom Action only on first timeinstall, not on Upgrade? Hi, > I have tried "NOT Installed AND NOT REMOVEOLD". But MyCA is always be called > for every upgrade. Is there something wrong with the > Property='PREVIOUSFOUND'? What can I do for Upgrade? > > Try "NOT Installed AND NOT PREVIOUSFOUND". > <Upgrade Id='8517ae9a-667d-4bd3-9cea-4323be6d7040'> > <UpgradeVersion OnlyDetect='no' Property='PREVIOUSFOUND' > Minimum='1.0.0.0' IncludeMinimum='yes' > Maximum='3.0.0.0' IncludeMaximum='no' /> > > </Upgrade> > > The property PREVIOUSFOUND will contain the UIDs of the products that were found that match your min and max version (and have the correct UpgradeCode). If it doesn't find any matches the property is not set. A property that is not set counts as 'false' and one that contains a string containing UIDs counts as 'true'. That is why "NOT PREVIOUSFOUND" should work. > I don't know how to use RemoveExistingProducts element. > Please consult the C:\Program Files\Windows Installer XML v3\doc\WiX.chm Also make sure the FindRelatedProducts action is executed, but I think WiX will do this for you when you have the Upgrade element. http://msdn.microsoft.com/en-us/library/aa368600(VS.85).aspx Best regards, Kim -- *Kim Gybels Software Developer * kim.gyb...@metris.com <mailto:kim.gyb...@metris.com> Tel: +32 16 74 01 01 Fax: +32 16 74 01 02 * Metris Europe * Interleuvenlaan 86 3001 Leuven Belgium www.metris.com <http://www.metris.com/> This message and any attachment are privileged, confidential and contain private information. If you are not the addressee named above any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is prohibited. If you have received this transmission in error, please notify the sender immediately and destroy this e-mail. Metris does not guarantee that the integrity of this communication has been maintained or that this communication is free of viruses, interceptions or interference, and shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Incoming and outgoing email communications may be monitored by Metris, as permitted by applicable law and regulations. ------------------------------------------------------------------------------ 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 ------------------------------------------------------------------------------ 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