Command Prompt for Windows

Program Run Options

The system menu contains the Attributes... option, as below :-

When selected will display the Attributes window containing the Program tab, as below :-

The Program tab displays various options for how programs are run from the WinOne® Command Prompt, such as, leaving a DOS/console window inactive, setting 32 bit Console Emulation options, how are GUI programs run, should the WinOne® Command Prompt faviour 64 bit programs on WOW64, should 16 bit prgrams be run in it's only virtual machine and lastly, it allows easy management of the No Capture list.

Program Run Options

When a tick mark appears next to the options text (as above), then the option is switched on, otherwise, the option is switched off. Simply position the mouse pointer over the option text and press the left mouse button to toggle the option on or off. The tick mark will either be shown or removed, respectively.

Inactive text mode windows on Exit

When a text mode type program is run in its own separate window, either the window will be left open or the window will be automatically closed when the program has finished executing.

This option, when switched on, will leave the window open. The windows title will be changed to include the word "Inactive", signaling that the program has completed executing and may be closed manually at any time.

To set this option from the command prompt see the DOS command.

Capture 32-bit console programs input/output

Console programs refer to text mode type programs that are written using the Windows console Application Programming Interface (API). Most standard DOS commands have been convert to console programs in Windows NT onwards. For example, CMD.EXE under Windows NT is a console program.

The option "Capture 32-bit console programs input/output", when switched on, allows console programs to use the main WinOne® Command Prompt window for their input and output, instead of creating their own windows. For example, the following screenshot shows CMD.EXE running inside the main WinOne® Command Prompt window :-


Pressing the Control key together with the Z key (Ctrl Z) will signal to the currently running console program under emulation that it has reached the End-Of-File for Standard Input. Pressing Ctrl Z a second time will put the currently running console program into the background and return the command prompt. Use the command TASKS to close a console program that has been placed into the background.

Console Emulation requires Windows NT and above to work and is disabled on eariler versions of Windows. Named Pipes is available on all operating systems.

Console Emulation Vs Named Pipes

In Windows, there are 3 ways to capture a text based console applications input and output. The article "Windows and Capturing Console I/O" discusses two methods, Name Pipes and Polling. Both these methods have their limitations and will only ever work with the simplest of text based console applications! The third method is called Console Emulation. In theory, Console Emulation is capable of working with all text based console applications, however, in practice, only a small subset of all the console APIs are emulated and if a text based console application uses an un-emulated function, that application will fail.

Once Console capturing is switched on, simply choose which ever method works best for you, that is, click on the "Use Console Emulation" or "Use Named Pipes" option.

As Console Emulation is a work in progress, tick the "Display copyright and version information" option to see what version of the emulator is currently installed with the WinOne® Command Prompt, as the WinOne® Command Prompt runs a console program.

Tick the "Enable logging to woe32.log" to get a log of what the emulator is doing. The log file woe32.log is written to the %TEMP% directory.

The following two files make up the Console Emulation package included in the WinOne® Command Prompt :-

  1. WOLD32.EXE - the console application loader
  2. WOE32.EXE - the console emulator

No Capture List Management

Not all console programs can use the main WinOne® Command Prompt window for their input and output, especially since Console Emulation is a work in progress. Click on the Add button to add a console program to the No Capture list to prevent the WinOne® Command Prompt from capturing the programs input and output. Programs in the No Capture list will simply be run in their own Console window. Use the Remove button to delete programs from the No Capture list.

You can also use the CAPTURE command to add or remove console programs from the No Capture list. See command CAPTURE for more information.

Launch non-text mode programs only

Non-text mode programs refer to programs that use the Windows Graphical User Interface (GUI). These programs include NOTEPAD.EXE, WIN_ONE.EXE etc.

This option, when switched on, will only launch non-text mode programs and return the command prompt immediately, ready for the next command. When the option is switched off, the WinOne® Command Prompt will wait for non-text mode programs to finish and exit before the command prompt is returned. A program can still be placed into the background manually by pressing the Ctrl key and the Z key together (ie. Ctrl Z). See Command Execution and Precedence for more information on placing a program into the background manually.

Favour 64-bit GUI programs on WOW64

This option is switched on by default when the WinOne® Command Prompt is run on a 64-bit Windows operating system. It enables the WinOne® Command Prompt to choose to run 64-bit GUI programs when entered at the command prompt. If this option is switched off, then the WinOne® Command Prompt will run the 32-bit program instead.

There are exceptions to the rule, such as when the 64-bit program does not exist, the WinOne® Command Prompt will instead run the 32-bit program and visa-versa. See command WHICH to display information about the program the WinOne® Command Prompt runs.

Separate VDM (16 bit programs)

This option, when switched on, will allow all 16 bit non-text mode programs to run in their own virtual environment. Programs run in this way will pre-emptively multi-task. When this option is switched off, all 16 bit non-text mode programs will run in a single environment using a cooperative multi-tasking mechanism.

To individually run programs in a separate VDM see the START command.

This option is only available on Windows NT 3.5 or higher.