WIN.INI Programs= Line, File Extensions, and Execution Order (90708)
The information in this article applies to:
- Microsoft Windows 3.0
- Microsoft Windows 3.0a
- Microsoft Windows 3.1
- Microsoft Windows 3.11
This article was previously published under Q90708 SUMMARY
Windows looks at file extensions and filenames when searching for and
running executable files specified on the command line accessed by choosing
Run from the File. This is slightly different than the method used by MS-
DOS, and can affect processing order.
MORE INFORMATION
The MS-DOS command processor ignores filename extensions at first and looks
in itself for a string matching the command to be processed. If it finds
none, it looks in the current directory and then along the PATH for
filenames matching the issued command and having, in this order, the .COM,
.EXE, or .BAT extension. This is a search order only -- MS-DOS always
executes .COM files before .EXE files, regardless of any extension you
specify on the command line. If, for instance, it finds a MYPROG.COM and a
MYPROG.EXE in the same place, MS-DOS always runs MYPROG.COM first. However,
the processor runs MYPROG.EXE before MYPROG.COM if MYPROG.EXE is found
first during the PATH search.
Windows behaves differently, using the executable file extension defined in
the Programs= line of WIN.INI. The typical listing order for executable
extensions is COM, EXE, BAT, and PIF. If you choose Run from the File menu
in File Manager or Program Manager, and enter the string MYPROG without an
extension in the command line, Windows executes MYPROG.COM before
MYPROG.EXE. If you specify the full name and extension in the command line,
Windows uses the extension to determine which file to load. While this also
is true of MS-DOS, Windows allows you to change the search order.
If you run only Windows executable files and do not specify an extension,
you may be able to boost system performance slightly by listing .EXE files
before .COM files.
REFERENCES
"Microsoft Windows User's Guide," version 3.0, pages 52-53
WININI.TXT file included with Windows 3.0
"Microsoft Windows User's Guide," version 3.1, page 134
WININI.WRI file included with Windows 3.1
Modification Type: | Minor | Last Reviewed: | 7/7/2005 |
---|
Keywords: | KB90708 |
---|
|