>我有以下脚本来执行 NSIS 制作的第三个可执行文件,在我的应用程序的 inno 设置中使用命令/s(静默安装)。
[Files]
Source: "..programB.exe"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: InstallProgramB
[Code]
procedure InstallProgramB;
var
ResultCode: Integer;
begin
// Install programB and wait for it to terminate
if not Exec(ExpandConstant('{app}programB.exe'), '/s', '', SW_SHOWNORMAL,
ewWaitUntilTerminated, ResultCode) then
begin
MsgBox('Failed to install programB!' + #13#10 +
SysErrorMessage(ResultCode), mbError, MB_OK);
end;
end;
问题是它弹出了程序B的向导.exe这不是"静默安装"。 我看过这个并将命令行参数"/s"放在第二个参数上(如您所见),但/s 似乎不起作用。欢迎任何意见
查看 NSIS 帮助
Passing /S on the command line (case sensitive))
因此,正确的参数应该是/S,而不是/s。区分大小写