The function class of shellexec in Inno Setup seems to be the ShellExecute Function of Windows API. to execute an operation, you can start a process, open a browser, and so on.
However, the shellexec of Inno Setup has an advantage, which is reflected in the sixth parameter.
First, check shellexec:
Function shellexec (
Const verb,
Filename,
Params,
Workingdir: string;
Const showcmd: integer;
Const wait: texecwait;
VaR errorcode: integer): Boolean;
The first parameter indicates the action to be executed. Generally, you can use 'open' to start a process. The second parameter indicates the process name, including the path, and the third parameter indicates the command line parameter, the fourth parameter is the working path, the fifth parameter indicates whether to display, and the seventh parameter is an error code.
The sixth parameter is as follows:
Texecwait = (ewnowait, ewwaituntilterminated, ewwaituntilidle );
If ewnowait is used, shellexec returns immediately after the process is started.
If ewwaituntilterminated is used, the shellexec will be blocked after the process is started and will be returned after the started process is terminated.
If ewwaituntistmle is used, shellexec returns when the CPU is idle.
Among them, ewwaituntilterminated is very useful, so that you can freely control the execution of other operations in an installer.