在WiX脚本中执行命令行? [英] Execute Command Line In WiX Script?
问题描述
如何从WiX脚本中执行命令行?
How can I execute a command line from within a WiX script?
我想动态生成一个命令行字符串并执行它.我没有安装与此相关的文件.
I want to dynamically generate a command line string and have it executed. I'm not installing a file related to this.
使用3.0.5419版.
Using version 3.0.5419.
推荐答案
您可能想要的是这样的东西(在命令中需要的地方加上引号):
What you probably want is something like this (observing quotes where necessary in the command):
<CustomAction Id='ExecNotepad' Directory='INSTALLDIR' Execute='immediate'
ExeCommand='[SystemFolder]notepad.exe "[SOMEFILE]"' Return='ignore'/>
ExeCommand是您要放置命令的位置.在这里,我有一个带有文件启动的记事本.某些属性会有所不同,具体取决于命令的功能-尤其是Execute和Impersonate参数.了解您使用的是哪个版本的WiX(上面的代码是v2)也将有所帮助.
The ExeCommand is where you want to put your command. Here I have notepad launching with a file. Some of the attributes will be different, depending on what your command does - particularly the Execute and Impersonate parameters. It would also be helpful to know what version of WiX you were using (the code above is v2).
这篇关于在WiX脚本中执行命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!