I don't quite understand what you are attempting to do. You have some component somewhere that installs a file ([SignWrapper_RootDir]signwrapper.xml) that four other components modify upon installation and "revert" upon removal. So far so good.
What are the criteria used to determine which of the four components operates on the file? What criteria is used to determine if the file itself is installed/removed? Are these components all in the same feature or in separate features? Do any of these components have conditions apart from what you have shown attempting? Here is a little bit about how Windows Installer views components: Components are atomic units of installation that contain resources (registry keys, files, custom action associations, etc.). A component is either installed or uninstalled, and can be a member of one or more features as well as one or more products. When all features/products that a component belong to are removed, the component is removed as well. The only way to leave a component behind is to mark it permanent (which causes it to be additionally associated with a "dummy" product that cannot be removed). That election is static for any given package and may possibly only be changed by patching the product with a separate file (msp, small update/minor upgrade msi) in a separate installation transaction (cannot be done during removal). The only way to conditionally leave a component during removal is to isolate that component into a feature you "leave behind", except that the product remains installed as well. The only other question I have for you is how you plan on addressing upgrades? I can only refine that question once I have the answers to the other questions, however. -----Original Message----- From: Thorsten Schöning [mailto:tschoen...@am-soft.de] Sent: Saturday, October 10, 2009 5:45 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Problems with deactivating a component while package removal Hello all, my installer produced with version 2 of the WiX toolkit installs one XML-file which should be configurable via the installer using some specific features and components. Those components use XmlFile to set a specific value on installation of the feature/component and XmlConfig to delete and create an empty new element on uninstallation of the component. Foolowing is one example, I have 4 of those components and all should work the same. <Component Id="SignWrapper_XMLSettings_PDF" Guid="A927749E-7CDE-456a-9FE7-FD0813E8CB71"> <XmlFile Id="SignWrapper_XMLSettings_PDF1" File="[SignWrapper_RootDir]signwrapper.xml" Action="setValue" Value="0" ElementPath="//signwrapper/BEFDE7B3-54DB-419e-BB46-5FA8CE997AD5/spezial/disa blePdfInline" Sequence="1" /> <XmlConfig Id="SignWrapper_XMLSettings_PDF2" File="[SignWrapper_RootDir]signwrapper.xml" Action="delete" Node="element" ElementPath="//signwrapper/BEFDE7B3-54DB-419e-BB46-5FA8CE997AD5/spezial" VerifyPath="disablePdfInline" Sequence="1" On="uninstall" /> <XmlConfig Id="SignWrapper_XMLSettings_PDF3" File="[SignWrapper_RootDir]signwrapper.xml" Action="create" Node="element" Name="disablePdfInline" ElementPath="//signwrapper/BEFDE7B3-54DB-419e-BB46-5FA8CE997AD5/spezial" Sequence="2" On="uninstall" /> </Component> The code above works like expected but has one problem: On removal of the complete package the component, if installed, is removed, too. But it seems that at the point the component is removed and the XmlConfig-code is executed, the needed xml file is already deleted and XmlConfig produces an error about the missing file. My intention was to somehow deactivate the component if the complete package is removed, because I want the component to be deinstalled on it's own to change back the config made with XmlFile. Whatever I tried I didn't get it working to deactivate the component dynamically on the fact, the package is removed. I tried something like the following: <Condition> <![CDATA[REMOVED >< "Complete"]]> </Condition> <Condition> <![CDATA[NOT (WixUI_InstallMode >< "Remove")]]> </Condition> <Condition> <![CDATA[NOT (WixUI_InstallMode = "Remove")]]> </Condition> This doesnt' seem to have any effect, I think the state of the component is set once at the start of the installer, not, when the component is actually "needed". If I just set Condition to 0 or 1 it works like expected, but of course I need a value dynamically calculated on the behaviour of the installer. Does anyone has a idea on how to achieve my goal? Thanks in advance. Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig Telefon: Potsdam: 0331-743881-0 E-Mail: tschoen...@am-soft.de Web: http://www.am-soft.de AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow ---------------------------------------------------------------------------- -- 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