如何通过Inno Setup参数精确控制.exe文件运行过程?
- 内容介绍
- 文章标签
- 相关推荐
本文共计203个文字,预计阅读时间需要1分钟。
请尝试在CMD控制台运行以下命令:+nameFile.exe+-inf+fileDriver.inf+install在Inno Setup中,我使用了以下内容:+varcommand: String=Begincommand :='nameFile.exe -inf fileDriver.inf install'; command :='AddQu';
请尝试运行cmd控制台中运行的.exe文件,方法如下:nameFile.exe -inf fileDriver.inf install
在Inno Setup中我有以下内容:
var command: Srtring; Begin command := 'nameFile.exe -inf fileDriver.inf install'; command := AddQuotes(command); Exec(command, '', 'C:\pathOfFileName', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); S:= SysErrorMessage(ResultCode); MsgBox(S, mbInformation, MB_OK); end;
消息显示参数无效,如何用参数运行exe文件?
查看Exec调用,需要将命令参数传递给函数调用的第二个参数.尝试使用类似的东西:
... Exec('nameFile.exe', '-inf fileDriver.inf install', 'C:\pathOfFileName', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); ...
Exec函数声明为:
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
本文共计203个文字,预计阅读时间需要1分钟。
请尝试在CMD控制台运行以下命令:+nameFile.exe+-inf+fileDriver.inf+install在Inno Setup中,我使用了以下内容:+varcommand: String=Begincommand :='nameFile.exe -inf fileDriver.inf install'; command :='AddQu';
请尝试运行cmd控制台中运行的.exe文件,方法如下:nameFile.exe -inf fileDriver.inf install
在Inno Setup中我有以下内容:
var command: Srtring; Begin command := 'nameFile.exe -inf fileDriver.inf install'; command := AddQuotes(command); Exec(command, '', 'C:\pathOfFileName', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); S:= SysErrorMessage(ResultCode); MsgBox(S, mbInformation, MB_OK); end;
消息显示参数无效,如何用参数运行exe文件?
查看Exec调用,需要将命令参数传递给函数调用的第二个参数.尝试使用类似的东西:
... Exec('nameFile.exe', '-inf fileDriver.inf install', 'C:\pathOfFileName', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode); ...
Exec函数声明为:
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;

