1. WiX extensions should be unmanaged code so that they can be used by the broadest user set without taking on unexpected dependencies. Especially for something as simple as search-and-replace, I think the productivity gain you get from managed code is far outweighed by the extra dependency you force all users of the extension to deal with.
2. MSI will not overwrite an unversioned file if it was modified after it was created, assuming it's a component key file. But a non-key-file will be re-copied whenever its key is updated. I think your best bet for updates is to use a whole file replacement and re-run the search-and-replace process after any update. As an alternative low-tech approach, my team just maintains separate config XML files for each environment (dev, test, LKG, production) and the installer will choose one of them based on component conditions. If the configuration is complex, you can generate the files by doing the search-and-replace at build time. -Jason- -----Original Message----- From: Robert O'Brien [mailto:robert.obr...@microsoft.com] Sent: Saturday, December 13, 2008 10:39 AM To: General discussion for Windows Installer XML toolset. Cc: Dmitry Frenkel; Jim Appleberry; Brad Uhrich Subject: Re: [WiX-users] does <util:XmlFile or <util:XmlConfig or <util:??? have some way of just doing a token search and replace throughout an entire file? If a person wanted to create some form of wix support for installed .txt or .xml file regular expression search and replace... q1. What would you gain by taking on the effort of the native code implementation work necessary to provide it as a wix extension versus creating support for this using a dtf managed custom action? q2. Is there some wix / msi provided functionality that provide a solution for the case where the modified file was not part of the installer deployed files, or patch applied change to unpatched release deployed file, where if you could easily handle it you would want to be able to revert the wix extension or dtf managed custom action modified file back to its state prior to the regular expression searchNreplace was applied? -----Original Message----- From: Rob Mensching [mailto:rob.mensch...@microsoft.com] Sent: Wednesday, December 10, 2008 8:53 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] does <util:XmlFile or <util:XmlConfig or <util:??? have some way of just doing a token search and replace throughout an entire file? No. -----Original Message----- From: Robert O'Brien [mailto:robert.obr...@microsoft.com] Sent: Tuesday, December 09, 2008 16:37 To: 'General discussion for Windows Installer XML toolset.' Subject: [WiX-users] does <util:XmlFile or <util:XmlConfig or <util:??? have some way of just doing a token search and replace throughout an entire file? I have a bindings.xml file that my wix component deploys that I then need to roll through and just do a search and replace of all "localhost" hits before this file gets processed by an After="InstallFiles" custom action. Does <util:XmlFile or <util:XmlConfig or <util:??? have some way of just doing a token search and replace throughout an entire file? ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users