在 WiX 脚本中执行命令行? [英] Execute Command Line In WiX Script?

查看:21
本文介绍了在 WiX 脚本中执行命令行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 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 &quot;[SOMEFILE]&quot;' 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆