aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/test/WixToolsetTest.Util/TestData/XmlConfig/Package.wxs
blob: cb132960b870dc149e4a00c25954f1a09e482493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
    <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
        <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />

        <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
            <Component Directory="INSTALLFOLDER">
                <File Id="MyXmlFile" Source="my.xml" />
            </Component>
            
            <Component Id="Del" Directory="INSTALLFOLDER" Guid="3613414c-11f5-40fa-a1f1-a0ba722a6895">
                <util:XmlConfig Id="DelElement" File="[#MyXmlFile]" Action="delete" Node="element" VerifyPath="grandchild1" ElementPath="//root/child1" On="install" />
            </Component>

            <Component Id="Add" Directory="INSTALLFOLDER" Guid="30A9FF8B-7AC8-47F3-BB24-9EA81AA38856">
                <util:XmlConfig Id="AddElement" File="[#MyXmlFile]" Action="create" Node="element" ElementPath="//root/child2" Name="grandchild3" On="install" Sequence="2" />
                <util:XmlConfig ElementId="AddElement" File="[#MyXmlFile]" Name="TheAttribute1" Value="AttributeValue1" Sequence="3" />
                <util:XmlConfig Id="AddAttribute2" ElementId="AddElement" File="[INSTALLFOLDER]my.xml" Name="TheAttribute2" Value="AttributeValue2" Sequence="4" />
            </Component>
        </Feature>
    </Package>

    <Fragment>
        <StandardDirectory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
        </StandardDirectory>
    </Fragment>
</Wix>