A.3.6.3 Shell Section Commands

The following commands can only be called from a shell section.

Detect Command

The Detect command interprets the lines of the specified detect section, which must be in the same INF file as the calling shell section. For lines containing the ? operator, Detect assigns to the specified key the string returned by the specified DLL function. Lines that do not contain the ? operator are ignored.

The syntax of the command is:

Detect SectionName

SectionName
Identifies the detect section.
Exit Command

The Exit command causes the Setup program to exit, when called from a shell section. The Exit command can also be used in an install section, where it functions as a return to the shell section that called it, and does not terminate Setup. The syntax of the command is:

Exit
 
Install Command

The Install command calls the specified install section, which must be in the same INF file as the calling shell section. The Setup program executes the lines of the install section, with control returning to the shell section when the install section exits. .

The syntax of the command is:

Install SectionName

SectionName
Identifies the install section.
Read-Syms Command

The Read-Syms command interprets the lines of the specified detect section, which must be in the same INF file as the calling shell section. For lines of the form: key = value, the Setup program creates a variable named key in the symbol table of the calling shell section. The value string is stored as the value of this variable. The ? operator, if present on any of the lines, is ignored.

The syntax of the command is:

Read-Syms SectionName

SectionName
Identifies the detect section.
Return Command

The Return command causes the flow of execution to return from the called shell section back to the calling shell section. The syntax of the command is:

Return [ReturnValue[,]]*

ReturnValue
Zero or more comma-separated or space-separated string values to return to the shell section that called this shell section.
Shell Command

The Shell command calls the specified shell section, which can be in the same or in a different INF file. The calling shell section can pass multiple arguments to the shell section, and it can receive multiple return values from the shell section.

The syntax of the command is:

Shell inf_file_path section_name [Args]*

inf_file_path
Specifies the full or partial path of the INF file in which the section is located. An empty string (““) indicates the current file.
section_name
Identifies the shell section (name in square brackets).
Args
Zero or more comma- or whitespace-separated arguments.