Command Execution and Precedence
When a program or command is run from the command prompt, there are a number of rules which resolve conflicts that can occur when there are several programs or commands that have the same file name but have a different file name extension. In order to resolve these conflicts, internal commands are given the highest precedence, otherwise when a command is entered with no file extension, then the extensions .EXC, .LNK, .PIF, .COM, .EXE, .CMD, .BAT and .WBT are tried, in that order.
There are two methods use by the WinOne® Command Prompt to locate a command or program when it can not be found in the current directory. The first is to look at various locations in the System Registry and if not found, then the second is to use the PATH environment variable. If a command or program can not be located using the two methods just outlined, then the WinOne® Command Prompt will assume a directory name has been specified and will attempt to change to the specified directory. This process is referred to as Automatic Directory Changing. Should Automatic Directory Changing fail then the error message Bad command or file name is displayed.
All text mode type (console) programs and Windows GUI programs can be executed from the command prompt. When a program is executed, then the command line will not appear until the program has completely finished executing. The user can place an executing program in the background before it has completed executing, and thereby displaying a new command prompt, by pressing the control key and the z key together (ie. CTRL Z). By default, the WinOne® Command Prompt will not wait for non-text mode type programs to complete executing, before displaying a new command prompt (eg. NOTEPAD.EXE etc). To change this behaviour see Program Run Options.
Many Windows or non-text mode type programs allow command line arguments to be past at the command prompt, similarly to text mode type programs and commands. For example, to edit a file called REPORT.TXT, enter at the command prompt :-