Here is little sample on updating value of the attribute in App.config: App.config:
<?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="Key1" value=""/> </appSettings> </configuration> Wix code: <!-- Set value of Key1 --> <XmlConfig Id="SetKey1" Action="create" Node="value" ElementPath="//appSettings/[EMAIL PROTECTED]'Key1'[\]]" VerifyPath="//appSettings/[EMAIL PROTECTED]'Key1'[\]]" Name="value" Value="[INSTALLLOCATION]" File="[#AppConfig]" On="install" Sequence="1" /> Hope this helps, Alex Shevchuk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evans, Jim Sent: Monday, June 23, 2008 7:13 AM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] XmlConfig question I have a question about the XmlConfig custom action. My application is a .NET application, and is deployed with an application.exe.config file. Based on properties gathered during the installation, I want to update the values in the config file. Here's the relevant portion of my config file. <configuration> <databaseSettings server="" databaseName="" userName="" password="" /> </configuration> The only way I can get XmlConfig to work is to delete the <databaseSettings /> element and re-add it, then add the attributes to the recreated element. Do I have to do it this way, or is there some syntactic magic I don't yet know to get XmlConfig to write the attributes directly? N.B., I'm using a custom configuration handler in my application to read and write these elements so it is correct that the do not exist as a child of appSettings, and no, I'm not storing the password in plain text. --Jim Evans Numara Software, Inc. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users