Starting From the Command Line

A DOS application can also be started from a DOS or OS/2 command line. Note, however, that starting the application in this way provides no opportunity to configure the VDM environment to support particular application requirements. Certain settings may be changed during application execution. However, such settings will be saved and will remain in effect until explicitly reset by the user.

The default settings also allocate resources for EMS, XMS and DPMI support, which may not be required by the DOS application. For these reasons, it is recommended that DOS applications which require non-default settings be configured and started from the Workplace Shell wherever possible.

When starting the application from a DOS command line, the application loads and executes within the VDM which displayed the command line. All DOS environment settings used by the application are those in effect for the VDM when the application was started. When the application terminates, control is returned to the command line.

When starting the application from an OS/2 command line, the operating system reads the program file from disk, and determines from the executable file header that the program is a DOS or Windows application rather than an OS/2 application. The operating system then automatically creates a VDM and loads the application into the VDM. When the application terminates, the VDM is also terminated and control returns to the OS/2 command line.

Note that in either case, execution is synchronous, and the command line is not available for use while the application is running. An application may be started asynchronously from an OS/2 command line using the START command. In this case, the operating system creates an asynchronous VDM and loads the application into this VDM. The OS/2 command line remains available even though the DOS application is still running.


[Back: Starting From the Workplace Shell]
[Next: Applications With Special Requirements]