I just put my xml edits in it's own component:

          <!-- This component edits the web.config based on values
obtained from the Summary dialog above -->
          <Component Id="EditWebConfig" Guid="" KeyPath="yes">
            <util:XmlFile Id="RequireCorrectCaptchaCode"
Action="setValue"
ElementPath="/configuration/appSettings/[EMAIL PROTECTED]'RequireCorrectCaptc
haCode'[\]]/@value" File="[INSTALLDIR]Web.config"
Value="[[TARGET_ENVIRONMENT].CAPTCHA_REQUIRED]" />
            <util:XmlFile Id="AllowAccountAlertTraffic"
Action="setValue"
ElementPath="/configuration/appSettings/[EMAIL PROTECTED]'AllowAccountAlertTr
affic'[\]]/@value" File="[INSTALLDIR]Web.config"
Value="[[TARGET_ENVIRONMENT].ACCOUNT_ALERTS_TRAFFIC]" />
            <util:XmlFile Id="CustomErrorsMode" Action="setValue"
ElementPath="/configuration/system.web/customErrors/@mode"
File="[INSTALLDIR]Web.config"
Value="[[TARGET_ENVIRONMENT].CUSTOM_ERRORS_MODE]" />
            <util:XmlFile Id="Log4NetFilePath" Action="setValue"
ElementPath="/configuration/log4net/appender/[EMAIL PROTECTED]'File'[\]]/@
value" File="[INSTALLDIR]Web.config"
Value="[[TARGET_ENVIRONMENT].LOG4NET_PATH]" />
            <!-- do not update config if Production is chosen -->
            <Condition><![CDATA[NOT
TARGET_ENVIRONMENT<<"PRODUCTION"]]></Condition>
          </Component>

Sorry about the wordwrap. Be sure you include/link the Util extension.
Your 'Wix' tag will probably look something like this:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension";
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>

Note that my Value tags above are public properties that are chosen by
one of the dialogs, but they can be literal values.


-Matt

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Nemtsev
Sent: Tuesday, May 15, 2007 8:08 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to update xml config with wix3?

I'd like to know how to update web.config using Wix3?
I've seen the sample about wix2
http://www.tramontana.co.hu/wix/lesson5.php#5.11
but cant understand how to make this with Wix3.

------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to