如何在NSIS脚本中运行exe文件? [英] How to run exe files in NSIS Script?

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

问题描述

在InnoSetup中,有一个名为 run 的部分将执行exe,批处理文件和msi.我们还可以为该运行提供命令行参数.

In InnoSetup, there is a part called run which will execute the exe, batch file and msi. We can also give command line parameters to this run.

我提供了Innosetup示例:

I provide the Innosetup sample:

[Run]
Filename: "{app}\msdirent.exe ";
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\NETCFSetupv2.msi""" ; Check:ShouldInstallComCtlUpdate ;

但是在NSISS Script中,如何运行我的exe,并且还必须向相关的exe提供命令行参数?

But in NSISS Script, how to run my exe and also I have to provide command line arguments to the concerned exe?

推荐答案

尝试以下命令

Exec "$APPS\msdirent.exe"

对于命令行参数,

Exec "$APPS\msdirent.exe 1"

要向安装程序中添加msdirent.exe,

For Adding msdirent.exe to the installer,

SetOutPath "$APPS"
File "localpath\msdirent.exe"

Exec "$APPS\msdirent.exe 1"

这篇关于如何在NSIS脚本中运行exe文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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