Have you tried this: http://blogs.msdn.com/pmarcu/archive/2009/05/19/wix-removing-files-with- patches.aspx ?
To tell it short, make the component Transitive and make its condition always false. This should work, but I totally agree that this technique should be taken really carefully. Though, if you have no option, it can save you. :) -- Yan -----Original Message----- From: Lian Jiang [mailto:lji...@microsoft.com] Sent: Saturday, February 06, 2010 02:35 To: wix-users@lists.sourceforge.net Subject: [WiX-users] rename a file in a patch made using Pyro.exe Hi, I am using Pyro.exe to make a patch. When I change the Name and Source attributes of a file (KeyPath='yes'), Pyro threw error "Patches cannot change the keypath of a component." This behavior is confirmed by http://blogs.msdn.com/pmarcu/archive/2007/06/28/sample-patch.aspx: "The first error you got was accurate. You cannot change the keypath file of a component using a patch. This means you cannot delete the file either because the presence of the file is what dictates whether the component is installed. If you want to remove a keypath file, you need to remove the entire component which means you need to remove the entire feature that contains it. Its better just to leave the file there." - Petermarcu<http://blogs.msdn.com/pmarcu> Since the component consists by only that file, I tried to remove this component to see whether Pyro works. Unfortunately, it complains "Removing component is not supported". I think this is also expected according to above quote. So the only ways left are: Solution 1: add a new file while keep the old file. Solution 2: add a new file and remove the old file using a custom action. What are your experience of renaming a file using a pyro patch? Any better way? Thanks Lian ------------------------------------------------------------------------ ------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users