我在使用 wix 构建 msi 安装程序时遇到问题,它将安装一些 bat 文件并运行它。我在互联网上找到了一些示例,但我无法使其工作:/这是我的 wix 源文件
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="44A8F987-6B89-422B-B41F-1364AE1EF0D5" Name="my_name" Language="1033" Version="1.11.5164" Manufacturer="company" UpgradeCode="BD8652F4-1C1A-4825-9799-7DFB499B9F12">
<Package Description="Test file in a Product" Comments="Simple test" InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Name="my_folder" Id="MY_FOLDER">
<Component Id="CONFIGURE.BAT" DiskId="1" Guid="041ED78B-3D42-4EBD-8DAE-29D94DEFFC20">
<File KeyPath="yes" Id="file_configure.bat" Name="configure.bat" Source="C:\Documents and Settings\root\Desktop\some_path\configure.bat" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="MainFeature" Title="Main Feature" Level="1">
<ComponentRef Id="CONFIGURE.BAT" />
</Feature>
<UI />
<UIRef Id="WixUI_Minimal" />
<CustomAction Id="BatchCmd" Property="BatchRun" Value=""[#file_configure.bat]"" Execute="immediate">
</CustomAction>
<CustomAction Id="BatchRun" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="yes">
</CustomAction>
<InstallExecuteSequence>
<Custom Action="BatchCmd" Before="BatchRun">NOT Installed</Custom>
<Custom Action="BatchRun" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
</Wix>
Configure.bat
文件已正确安装,但在安装过程中不会运行。请帮忙