Hor*_*ux7 3 windows-installer custom-action wix
我在 wxs 文件中定义了一个自定义操作:
<CustomAction ExeCommand="long command line" FileKey="xyz.exe" Id="foo"/>
Run Code Online (Sandbox Code Playgroud)
我收到警告:
警告 LGHT1076:ICE03:字符串溢出(大于列中允许的长度);表:CustomAction,列:目标,键:
使用长命令行定义操作的正确解决方案是什么?
经过很多次我找到了解决方案。我将命令行拆分为多个属性。
<CustomAction Id="action.prop0" Property="prop0" Value="first part with [INSTALLDIR]"/>
<CustomAction Id="action.prop" Property="prop" Value="[prop0] second part"/>
<CustomAction ExeCommand="[prop]" FileKey="service.exe" Id="myaction"/>
<InstallExecuteSequence>
<Custom Action="action.prop0" After="InstallFiles"/>
<Custom Action="action.prop" After="action.prop0"/>
<Custom Action="myaction" Before="InstallFinalize"/>
</InstallExecuteSequence>
Run Code Online (Sandbox Code Playgroud)