我正在编写一个VB脚本,递归地进入目录并创建一个WIX XML文件 我收到错误Component元素包含一个意外的子元素'Directory'。当我尝试编译我的WIX时,有人可以帮忙。
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="MSI" Name="MSI">
<Component Id="first.txt" DiskId="1" Guid="*">
<File Id="first.txt" Name="first.txt" Source="C:\Users\xxxx\Desktop\MSI\first.txt" />
</Component>
<Component Id="TestProduct" DiskId="1" Guid="*">
<Directory Id="TestProduct" Name="TestProduct">
<Component Id="snet" DiskId="1" Guid="*">
<Directory Id="snet" Name="snet">
<Component Id="file1.txt" DiskId="1" Guid="*">
<File Id="file1.txt" Name="file1.txt" Source="C:\Users\xxxx\Desktop\MSI\TestProduct\snet\file1.txt" />
</Component>
<Component Id="custom" DiskId="1" Guid="*">
<Directory Id="custom" Name="custom">
<Component Id="file2.txt" DiskId="1" Guid="*">
<File Id="file2.txt" Name="file2.txt" Source="C:\Users\xxxx\Desktop\MSI\TestProduct\snet\custom\file2.txt" />
</Component>
</Directory>
</Component>
</Directory>
</Component>
</Directory>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="TestProductFeature" Title="Test" Level="1">
<ComponentRef Id="first.txt" />
<ComponentRef Id="TestProduct" />
<ComponentRef Id="snet" />
<ComponentRef Id="file1.txt" />
<ComponentRef Id="custom" />
<ComponentRef Id="file2.txt" />
</Feature>
<UI />
</Product>