Zhisheng Huang's Blog

WIX XmlConfig

Can't find good documents on WIX XmlConfig. There are some posts with examples that help me getting started:

Here is the summary of what I learned from the try-and-error approach,  

VerifyPath

  • when setting attribute value, it has no effect
  • when creating element
    • if exists, XmlConfig does nothing - skip the action and also all the XmlConfig that reference the id;
    • if not, creates the element, and other XmlConfig that reference the Id;

ElementPath reference Id

  • Does not work when Node is 'value' - it fails saying the path can not be found.
  • It works when Node is 'element'

Modifying attribute:

    <util:XmlConfig Id='SetServiceCertificateFindValue'
                    On='install'
                    Action='create'
                    Sequence='100'
                    File='[WebConfigFilePath]'
                    ElementPath='[XPath_serviceCredentials]/serviceCertificate'
                    Node='value'
                    Name='findValue'
                    Value='[SERVICE_CERTIFICATE_FIND_VALUE]' />

Published Wednesday, July 23, 2008 9:20 AM by zhish
Filed under: , , ,

Comments

 

kevinidzi said:

Any idea how to specify a namespace to use if the xml file has a namespace specified?

August 22, 2008 6:37 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker