Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

Shell

Action: Loads and runs a program.
 
Syntax: SHELL "command"
 
Remarks: Command can be any 16-bit or 32-bit application. To run command interpreter commands, specify the correct command interpreter as part of the command.

Script execution is stopped until the program exits. 

If the program you want to run needs to set environment variables (as is the case with Smsls.bat, for example), you may need to specify additional environment space by using the /E parameter.

SHELL sets the value of @ERROR to the exit code of the program that is run.
 
See Also: Run
 
Examples:

SHELL @LDRIVE + "\UPDATE.EXE"
SHELL "%COMSPEC% /e:1024 /c DIR C:"
SHELL "SETW USERNAME=@USERID"
SHELL "CMD.EXE /C COPY " + @LDRIVE + "\FILE.TXT C:\"
SHELL "%COMSPEC% /C COPY Z:\FILE.TXT C:\"
SHELL "C:\WINNT\SYSTEM32\CMD /E:1024 /C " + @LDRIVE + "\SMSLS.BAT"