如何在Inno Setup中不使用批处理文件的情况下执行命令行工具 [英] How do you execute command line tools without using batch file in Inno Setup

查看:97
本文介绍了如何在Inno Setup中不使用批处理文件的情况下执行命令行工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在了解到"Inno Setup可以在不利用批处理文件的情况下为您执行命令行工具." ( Inno Setup安装程序可以设置Windows安全组吗?)能够做到这一点很有意义.到目前为止,从我的网络搜索到Inno Setup,我找不到一个开始的地方来了解如何执行此操作.也许没有必要给出完整的答案,如果我只是对要寻找的内容有进一步的暗示,那可能就足够了.

I now understand that "Inno Setup can execute command line tools for you without utilizing batch file." (Can Inno Setup install set up a Windows security group?) It makes sense that it would be able to do that. From my web searches into Inno Setup thus far, I can not find an starting place to understand how to do this. A complete answer may not be necessary, if I just had some further hint as to what to look for, that would probably be good enough.

推荐答案

这意味着您不需要创建和执行批处理脚本(只需一个命令),也不需要通过命令提示符执行该工具(例如如下所示):

It was meant that you don't need to create and execute a batch script (with a single command), nor execute the tool through the command prompt (like shown below):

Exec('cmd.exe', '/c "net localgroup ..."', '', SW_SHOW, ewWaitUntilTerminated, Result);

但是您可以直接执行该工具:

But you directly execute the tool instead:

Exec('net.exe', 'localgroup ...', '', SW_SHOW, ewWaitUntilTerminated, Result);

[Run]部分也是如此:

[Run]
Filename: "{cmd}"; Parameters: "/c ""net localgroup ..."""

最好是这样:

[Run]
Filename: "net.exe"; Parameters: "localgroup ..."

这篇关于如何在Inno Setup中不使用批处理文件的情况下执行命令行工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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