【发布时间】:2013-10-27 12:09:56
【问题描述】:
我正在编写一个 VB 脚本,它递归地进入一个目录并创建一个 WIX XML 文件 我收到错误组件元素包含意外的子元素“目录”。当我尝试编译我的 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>
【问题讨论】:
-
我删除了部分 XML,因为它太长了
标签: xml vbscript wix installation windows-installer