## Display Device Driver Reference for OS/2

[prev][next][parent][TOC]

### RUN Command

The RUN command is used to specify one or more programs to execute. The specified programs and their associated parameters are listed in the lines following the RUN command.

The format of the RUN command line is :RUN.

Each program that is run can create DSP commands dynamically by writing them to that program's standard output device. When the program terminates, any DSP commands written to the output device are interpreted immediately by DSPINSTL. The dynamically created DSP commands are interpreted before the DSP file lines following the RUN program line are interpreted. The program must use only its standard output device for writing DSP commands.

If a RUN-specified program generates output other than DSP lines, it must be redirected to another file or to NULL. (See the example below.)

        :RUN
         MYPROG.EXE >NUL 2>&1

The RUN command ignores the return code from the programs it executes. Each program specification line that follows the RUN keyword command must adhere to the following format:

        <program pathname> [<program parameters>]

The RUN command also can be used to execute OS/2 command files (.CMD).