在 WiX 脚本中执行命令行?

发布于 2024-08-22 17:00:52 字数 85 浏览 2 评论 0原文

如何从 WiX 脚本中执行命令行?

我想动态生成命令行字符串并执行它。我没有安装与此相关的文件。

使用版本3.0.5419。

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.

Using version 3.0.5419.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少跟Wǒ拽 2024-08-29 17:00:52

您可能想要的是这样的(在命令中必要时观察引号):

<CustomAction Id='ExecNotepad' Directory='INSTALLDIR' Execute='immediate' 

ExeCommand='[SystemFolder]notepad.exe "[SOMEFILE]"' Return='ignore'/>

ExeCommand 是您想要放置命令的位置。这里我用记事本启动了一个文件。某些属性会有所不同,具体取决于您的命令的用途 - 特别是执行和模拟参数。了解您使用的 WiX 版本也会很有帮助(上面的代码是 v2)。

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'/>

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文