8.157 SH (Shell command)
8.157.1 Function
The SH command passes the given command and the parameters (if any) as-is to the shell for process-
sing. The results of the passed command are displayed on the Hercules console.
The special ‘STARTGUI’ command must be used if the command being started either directly or indirectly
starts a Windows graphical user interface (non command-line) program (e.g. Notepad). If STARTGUI is
not used in such cases then Hercules will hang until the graphical user interface program is closed. Note
that starting a batch file (command line program) that itself starts a graphical user interface program still
requires using STARTGUI.
If “foo.bat” contains “start notepad.exe” then issuing “sh foo.bat” will hang Hercules until Notepad is being
closed. The same applies if “sh start foo.bat” is used. The correct way is using ‘STARTGUI’ for invoking
foo.bat is “sh startgui foo.bat”.
8.157.2 Syntax
Descriptive
command [arg [arg ... ]]
Diagram
¬¬¬¬¬¬¬¬§¬¬¬ command ¬¬¬§¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬§¬¬¬¬¬¬ÊÍ
arg
8.157.3 Parameter
STARTGUI
STARTGUI must be used if the command passed to the shell either directly or in-
directly starts a Windows graphical user interface (non command-line) program.
command
The command that is to be passed to the shell.
arg
These are the parameters passed to the command.