Tips for Inno Setup 2-shellexec

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.