运行一个接一个地归档

Run File One After The Other

我正在尝试从 inno 安装文件的 运行 部分安装几个可执行文件。

我的文件部分如下所示。

[Run]
#if GNTCChecked == "True"

  Filename: "{tmp}\Utilities\SDK\setup.exe"; Description: "Install Foo"; Flags: nowait postinstall shellexec

  Filename: "{tmp}\Utilities\SDK\foobar.exe"; Description: "Install Foo Update"; 
  Flags: nowait postinstall shellexec

#endif

需要安装第一个文件才能安装第二个文件。

基本上如果第一个文件没有安装,第二个文件会抛出一个错误,解释核心文件不在系统中,因此无法安装。

目前,第一个文件正在执行,在第一个文件完成安装之前,第二个文件紧随其后。

这是我必须执行的操作,以便仅在第一个任务完成时一个接一个地执行文件。

[Run]
#if GNTCChecked == "True"

Filename: "{tmp}\Utilities\SDK\setup.exe"; Description: "Install Foo"; 
Flags: postinstall shellexec waituntilterminated

Filename: "{tmp}\Utilities\SDK\foobar.exe"; Description: "Install Foo Update"; 
Flags: postinstall

#endif

这是我阅读的信息,引导我找到答案。

shellexec This flag is required if Filename is not a directly executable file (an .exe or .com file). When this flag is set, Filename can be a folder or any registered file type -- including .chm, .doc, and so on. The file will be opened with the application associated with the file type on the user's system, the same way it would be if the user double-clicked the file in Explorer.

By default, when the shellexec flag is used it will not wait until the spawned process terminates. If you need that, you must add the flag waituntilterminated. Note that it cannot and will not wait if a new process isn't spawned -- for example, if Filename specifies a folder.