Computing.Net > Forums > Windows XP > The RIGHT way to run CMD.EXE

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

The RIGHT way to run CMD.EXE

Reply to Message Icon

Name: William C. McCain
Date: May 26, 2003 at 16:30:41 Pacific
OS: Windows XP Pro
CPU/Ram: 800 MHz, 256 MB
Comment:

Windows XP includes TWO command-line processors, CMD.exe and COMMAND.COM. The second one, COMMAND.COM, is a stripped-down version of the command processor from DOS. The Windows XP version of COMMAND.COM is severely restricted in its capabilities (lacks long filename support and many other features familiar from Windows 98SE), so it is all-but-unusable (see my previous post on this subject).

Furthermore, it turns out that there are TWO ways to run CMD.exe in Windows XP, although this fact is not documented anywhere. CMD.exe can be run from a shortcut (a .lnk file, which is the way that the Command Prompt window is set up "out-of-the-box" in Windows XP) or from a Program Information File (a .pif file). (COMMAND.COM, on the other hand, can ONLY be run from a .pif file, since it is a .com program and not a .exe program.)

I have found the .pif file method for running CMD.exe to be superior in most respects. For one thing, the .pif file "Properties" dialog gives you control of a lot more of the "compatibility" options. More importantly, however, most of my DOS applications simply run better when CMD.exe is invoked by a .pif file. The most visible difference is in the colors within the Command Prompt window. My favorite DOS-based source code editor, for example, displays with a hideous green background color when run under a CMD.exe shortcut, but runs correctly (with a black background) when run under CMD.exe invoked via a .pif file. The DOS full-screen "edit" command has similar problems with colors when run under a shortcut, but again runs correctly under a .pif file.

There are two minor annoyances, however, when running CMD.exe from a .pif file:

• Any switches that you specify in the "dir" command (such as "/w") are ignored. The "dir" command uses ONLY the options you have set in the environment via the "DIRCMD" variable.

• If you are sitting at a command prompt, not running a command or application, and you try to terminate the window by clicking the "X" box in the upper right-hand corner of the window frame, you get a "nag" dialog. The "exit" command does work correctly, without the nag.



Sponsored Link
Ads by Google

Response Number 1
Name: Kevin The Tech Dude
Date: May 26, 2003 at 16:41:19 Pacific
Reply:

I gotta ask. Are you bored tonight? I'm not knocking your post but damn dude. Is the whole DOS prompt thing getting at you?

KTTD



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: The RIGHT way to run CMD.EXE

can't open cmd.exe www.computing.net/answers/windows-xp/cant-open-cmdexe/142739.html

is this the right way www.computing.net/answers/windows-xp/is-this-the-right-way/58298.html

Failure to run setup.exe some Appl www.computing.net/answers/windows-xp/failure-to-run-setupexe-some-appl-/164391.html