Looping the list back in, in case anyone else has the same issue. -----Original Message----- From: Evan Beeton [mailto:ebee...@informasoftware.com] Sent: Friday, October 09, 2009 8:22 AM To: os...@live.com Subject: RE: [WiX-users] Prevent install from failing ifXmlFile elementdoesn't exist - Email found in subject - Email found in subject
Thanks for the help, this approach worked. -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Thursday, October 08, 2009 8:18 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Prevent install from failing ifXmlFile elementdoesn't exist - Email found in subject - Email found in subject AFAIK an XPath expression that doesn't find anything doesn't do anything without errors (however I didn't look at the source code to see if the CA flags an SFALSE as an error or not), so it is worth testing removing the element, then adding the element with its attribute, whenever you install (the first part should no-op and the second gets you where you want to be). -----Original Message----- From: Evan Beeton [mailto:ebee...@informasoftware.com] Sent: Thursday, October 08, 2009 6:21 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Prevent install from failing if XmlFile elementdoesn't exist - Email found in subject Thanks for the reply. The existing product is dependent on that element either being present and valid, or absent altogether. I suppose another option would be to delete the element with the "old" attribute if it exists upon install, and then create the new one. The problem with both approaches is I don't know how to do that conditionally in WiX, as you mention in point 1. -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Thursday, October 08, 2009 8:13 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Prevent install from failing if XmlFile elementdoesn't exist - Email found in subject You would need to do two things: 1. persist somewhere whether the element existed before you changed/added the attribute to it, and 2. retrieve that knowledge to condition the element removal. Could you blank out the attribute value instead? What other alternatives do you have? What happens if you never remove the element or the attribute? -----Original Message----- From: Evan Beeton [mailto:ebee...@informasoftware.com] Sent: Wednesday, October 07, 2009 11:28 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Prevent install from failing if XmlFile element doesn't exist Hello, I'm very new to WiX and Windows Installers in general. I'm writing an installer that's a new add-on for an existing product. The existing product has an XML file that I need to update. The new installer uses XmlFile setValue to "rename" a specific attribute in that XML file upon installation. During uninstall, XmlConfig is used to delete the element with that attribute. The upshot is that if you install then uninstall, that XML element no longer exists; this causes the XmlFile setValue to fail if you re-install. What I'd ideally like to do is "rename" the attribute if it already exists, and create the whole element if it doesn't. Is it possible to do this? Thank you ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users