Inno Setup:安装后运行命令

时间:2017-09-29 15:21:25

标签: windows shell installation command inno-setup

我的Inno安装程序安装在我的应用程序安装完成后运行程序。

我需要运行的程序可以使用以下命令执行:

C:\Path\To\Application\MyProgram.exe -c componentA -i C:\Path\To\Application\MyFile.bin

然后,我可以访问Window的注册表,检查 MyProgram.exe 是否成功实现了目的。

所以在我的Inno Setup Compiler .iss-file中我有这个设置:

[Files]
Source: "C:\Files\For\Installation\MyProgram.exe"; DestDir: "{app}"; Flags ignoreversion
Source: "C:\Files\For\Installation\MyFile.bin"; DestDir: "{app}"; Flags ignoreversion

安装完成后,我看到 MyProgram.exe 并且 MyFile.bin 已放置在安装应用程序的位置:

C:\Path\To\Application\MyProgram.exe
C:\Path\To\Application\MyFile.bin

我已经设置了我的Inno Setup脚本来运行具有如下参数的程序:

Filename: "{app}\MyProgram.exe"; Parameters: "-c componentA -i {app}\MyFile.bin";

我的意图是这将安装运行:

C:\Path\To\Application\MyProgram.exe -c componentA -i C:\Path\To\Application\MyFile.bin

运行安装时,我看到Window的终端已打开并立即关闭。我认为安装至少是试图运行我想要的。但由于它已立即关闭,我无法在Window终端中看到任何显示的信息。 检查Window的注册表时,没有任何改变=没有成功。

有什么建议吗?

0 个答案:

没有答案
相关问题