在 Wix 中安装后调用命令行 [英] Call command line after installation in Wix

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

问题描述

我正在使用 wix 并且想在安装后调用命令行.

I am using wix and want to call command line after installation.

我该怎么做?

我的命令行在这里 "bcdedit.exe/set {current} nx AlwaysOff"//这会使 dep 关闭

My command line is here "bcdedit.exe /set {current} nx AlwaysOff" // this makes dep off

是的,我已经阅读了自定义操作,但没有看到任何命令行示例.

Yes, I've read about custom actions, but I didn't see any example with command line.

附言bcdedit 是 Win 7 及更高版本中常见的 exe.

P.S. bcdedit is usual exe in Win 7 and higher.

附言目前我有下一个脚本,但它不起作用:

P.S. currently I have next script and it does not work:

          Directory  ="INSTALLLOCATION"
          ExeCommand ='echo hello> echo_test.txt'
          Execute    ="immediate"
          Return     ="asyncNoWait"
                />

推荐答案

好的,这个例子有效...

Ok, this example works...

<CustomAction Id         ="echo_test"                     
              Directory  ="INSTALLLOCATION"
              ExeCommand ='NOTEPAD.EXE echo_test.txt'
              Execute    ="immediate"
              Return     ="asyncNoWait"
                    />

由于某种原因,我的带有 echo 的测试示例不起作用.并且 bcdedit 在 WinXP 上不存在,我现在正在测试...

My test example with echo didn't worked for some reason. And bcdedit does not exist on WinXP, where I am testing now...

这篇关于在 Wix 中安装后调用命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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