# Syntax An operating-system command can be executed using the syntax: ``` local host "EXECUTABLE" "ARGUMENTS" "WORKING DIRECTORY" ["MAXIMUM DURATION IN MS"] ``` The command is started directly rather than through a shell, so pipes, redirection and wildcards are not interpreted. The standard output and the standard error are collected and forwarded to `dbms_output`, and are available afterwards in the pre-defined variables `local:hoststdout`, `local:hoststderr` and `local:hostexitcode`. An exit code other than zero raises an error, which can be handled using [[On Error]]. A command which exceeds the maximum duration is ended by force, together with all programs it started, after which the statement reports a time-out. Its exit code remains empty, since the code of a command ended by force says nothing about the work it was asked to do. For use from within PSQL, where the exit code and the output are wanted as values rather than as variables of a script, the package [[dbms_os]] offers the same facility as a table function. # Examples To start the Windows Explorer execute the following statement: ``` local host "explorer.exe" "" "" ```