Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

WinXP cmd.exe renamed to command.com

- - - - -

  • Please log in to reply
32 replies to this topic

#1
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag
I was just playing around with the cmd.exe file from WinXP and renamed it to command.com
and it still works as if nothing has change.
Now i was just wondering since i renamed it to command.com will it work on Win98SE?


How to remove advertisement from MSFN

#2
awergh

awergh

    MSFN Expert

  • Members
  • PipPipPipPipPipPip
  • 1,059 posts
  • OS:none specified
  • Country: Country Flag
The XP CMD.exe doesnt work for me i didnt rename it to command.com
(these are missing)

KERNEL32.DLL
GetVDMCurrentDirectories

(this i dont this is very important because it works on nt4 without these)
ADVAPI32.DLL
SaferRecordEventLogEntry
SaferCloseLevel
SaferComputeTokenFromLevel
SaferIdentifyLevel

#3
marxo

marxo

    UI Designer

  • Members
  • PipPipPip
  • 474 posts
  • OS:Windows 7 x64
  • Country: Country Flag
And it was to be expected since it is no command.com

#4
BenoitRen

BenoitRen

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 988 posts
  • OS:95
  • Country: Country Flag
.com and .exe files are of a different format. Changing the extension of a file will NOT magically change its format!

#5
jaclaz

jaclaz

    The Finder

  • Developers
  • 13,390 posts
  • OS:none specified
  • Country: Country Flag
Just for the record, there is a "cmd.exe" that works under win9x that has almost, but not quite, all the functionalities of 2k/Xp "cmd.exe":
http://www.boot-land...?showtopic=2392

jaclaz

Edited by jaclaz, 29 July 2008 - 04:16 AM.


#6
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag

Just for the record, there is a "cmd.exe" that works under win9x that has almost, but not quite, all the functionalities of 2k/Xp "cmd.exe":
http://www.boot-land...in9x-t2392.html

jaclaz

so its safe to say this file is ok or what
how many bugs etc...
it this a replace for command.com?

#7
BenoitRen

BenoitRen

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 988 posts
  • OS:95
  • Country: Country Flag

Sadly, its not HX-DOS compatible, so Windows GUI is required.

Doesn't look like it'd be a replacement for command.com in that case.

#8
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,539 posts
  • OS:98SE
  • Country: Country Flag

Donator

I was just playing around with the cmd.exe file from WinXP and renamed it to command.com
and it still works as if nothing has change.
Now i was just wondering since i renamed it to command.com will it work on Win98SE?


Hi, PROBLEMCHYLD! This is a characteristic behaviour that is inherited from good old MS_DOS:
The command interpreter can have any name. This is "by design". Moreover, it doesn't matter
whether the extention is .com or . exe, since both are known to the SO as "executable".
But probably it will stop working if you change the extention to .pdf or .txt ...
On the other hand, from the point-of-view of the program loader, if the extension is executale
it goes ahead and tries to execute the file, then checking the file format signature, to be able to
do so: if none is found it wil assume it's a .com (executable image) format and try to execute it
from the first byte, whereas if a format signature (MZ, PE, NE, LE) is found it will take the known
necessary steps to load correctly the diverse segments of the file, and then transfer control to the
address found in the program file header. By the way, MS-DOS 7.1 COMMAND.COM is, in fact, an
.exe file, as can be seen by loading it in any hexeditor and observing that the first two bytes are MZ.
The name is just a nod to older times. All this said, there remains the question of cmd.exe's depen-
dencies, which are another reason for it not to run under Win 9x. But that's another matter entirely.
In the past, there was a "fever" for replacements of the DOS command interpreter, the best know
of which was Norton Utilities's NDOS.COM (who else still remembers of it?)... HTH

#9
Tihiy

Tihiy

    the creator

  • Members
  • PipPipPipPipPipPipPip
  • 1,907 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Win95cmd.exe - excellent find! Does anyone have consize.exe?

As for solution, command.com and cmd.exe can be merged so command.com will work under DOS, and cmd.exe in Windows. I'll try to do that.

#10
jaclaz

jaclaz

    The Finder

  • Developers
  • 13,390 posts
  • OS:none specified
  • Country: Country Flag

so its safe to say this file is ok or what
how many bugs etc...
it this a replace for command.com?


No, the idea is to have under win9x/Me GUI (NOT under DOS 7.x command line) an alternate command interpreter capable of running .cmd batch scripts INSTEAD of .bat ones and take advantages of most (but NOT all) added features of batch commands from NT/2K.

For a replacement of DOS command.com, the reference is of course the JP Softwares 4DOS, which used to be Commercial, then was released as FREEWARE and recently became OPEN SOURCE :) !:
http://www.boot-land...urce-t2549.html

Start here:
http://www.4dos.info/
http://www.4dos.info/4dinfo.htm
if you do not know what 4DOS is.

Win95cmd.exe - excellent find! Does anyone have consize.exe?

I don't get it :unsure:, the download on the given site:
http://cygutils.fruitbat.org/consize/
has TWO builds of it, already compiled.

jaclaz

#11
oscardog

oscardog

    Member

  • Members
  • PipPip
  • 234 posts

Win95cmd.exe - excellent find! Does anyone have consize.exe?

As for solution, command.com and cmd.exe can be merged so command.com will work under DOS, and cmd.exe in Windows. I'll try to do that.

Try consize-vc from ftp://ftp.franken.de/pub/win32/develop/gn...size/index.html

#12
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 3,879 posts
  • OS:none specified
  • Country: Country Flag

For a replacement of DOS command.com, the reference is of course the JP Softwares 4DOS

Definitely a nifty replacement tool (glad someone else noticed it). But be forewarned that certain DOS equivalent functions yield slightly different output. This means that some BAT files (or commands eg DIR) may not yield the same results if output is fed into another process. AutoPatch for 98SE is currently detecting it as a "no-no" until the work-arounds can be obtained. Best bet (if you try it out) is to install it, revert the Autoexec.bat and Config.sys files to the originals (backed up automatically BTW) and read the HELP stuff for more info (sloooow reading). Most "standard Command.com" functions do work exactly the same.

On topic, a command.com that works like cmd.exe would be better. It would allow for CMD execution instead of the 4DOS-style alternative and would retain functional compatibility for DOS-style(?) output.

#13
marxo

marxo

    UI Designer

  • Members
  • PipPipPip
  • 474 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Well Tihiy had a good idea about merging those two. Why bothering with 3rd party apps?

#14
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 3,879 posts
  • OS:none specified
  • Country: Country Flag

On topic, a command.com that works like cmd.exe would be better. It would allow for CMD execution instead of the 4DOS-style alternative and would retain functional compatibility for DOS-style(?) output.

Well Tihiy had a good idea about merging those two. Why bothering with 3rd party apps?

??? I thought that's what I said ??? Besides, that could also be construed as "third party"...

Let it go (big "sigh" here). Many alternatives to suit the individual requirements. Wishing success to such an endeavor. I too would use it...

#15
StillOn98

StillOn98
  • Members
  • 7 posts
thanks

Edited by StillOn98, 08 March 2008 - 07:50 PM.


#16
Peffse

Peffse

    Newbie

  • Members
  • 48 posts
Hey, I'm curious... does KernelEX have any effect on those dependencies awergh mentioned?

#17
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag
I'm not sure which version to install
http://cygutils.frui...size/index.html

#18
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag
if i renamed the file to Cmd.exe and run this batch file here
http://www.infionlin...atch/fixcmd.htm
can i use this as default?

#19
os2fan2

os2fan2

    Advanced Member

  • Members
  • PipPipPip
  • 421 posts
Win95cmd comes in two versions: NT4 = 233k and NT5 = 307k. These were released as part of the SDK, but have become loose-distributed.

If you want functionality to match the 2K/XP cmd.exe, ye need to download the larger one (NT5). The smaller one emulates NT4's cmd.exe. In any case, putting it into \windows\command is a useful thing, because ye might want start | run | cmd.

I don't think it's a good thing to set COMSPEC globally to it, but you do need to set comspec in its session for things to work properly, ye use this reg file.

[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
"AutoRun"="set comspec=c:\\windows\\command\\cmd.exe"
"PathCompletionChar"=0x00000009
"CompletionChar" = 0x00000009

The first sets the comspec (ye need to change the path and exefile name, if Windows is not in c:\windows.) Pathcompletion sets tab to scroll through partly completed paths.

#20
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag
What about this reg file

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
"AutoRun"="SET COMSPEC=C:\\WINDOWS\\Cmd.exe"

[HKEY_LOCAL_MACHINE\Software\CLASSES\.cmd]
@="cmdfile"

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile]
@="Windows NT Command Script"
"EditFlags"=hex:d0,04,00,00

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell]
@=""

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell\open]
@=""
"EditFlags"=hex:00,00,00,00

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell\open\command]
@="C:\\WINDOWS\\Cmd.exe /C \"%1\" %*"

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell\print]
@=""

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell\print\command]
@="C:\\WINDOWS\\NOTEPAD.EXE /p %1"

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell\edit]
@="&Edit"

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shell\edit\command]
@="C:\\WINDOWS\\NOTEPAD.EXE %1"

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shellex]

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shellex\PropertySheetHandlers]

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\shellex\PropertySheetHandlers\{86F19A00-42A0-1069-A2E9-08002B30309D}]
@=""

[HKEY_LOCAL_MACHINE\Software\CLASSES\cmdfile\DefaultIcon]
@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-153"

Edited by PROBLEMCHYLD, 29 July 2008 - 03:27 PM.


#21
os2fan2

os2fan2

    Advanced Member

  • Members
  • PipPipPip
  • 421 posts
That works too. It just does not handle pipes though.

Solution: Use both.

#22
3dnowex

3dnowex
  • Members
  • 2 posts
the version of win95cmd.exe is 5.00.2144.1,seems from Windows 2000,
Can any body find one in Windows XP sp2(5.10.2600,or hihger)?
3Q!

#23
os2fan2

os2fan2

    Advanced Member

  • Members
  • PipPipPip
  • 421 posts
cmd.exe in Windows 2k is the same as the one in xp. So the 5.00. version will handle all of xp stuff.

I suspect also that there is no version to match xp, since by this time, development on the win9x line had largely stopped.

#24
PROBLEMCHYLD

PROBLEMCHYLD

    The Resurrector for old Windows OS

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,528 posts
  • OS:98SE
  • Country: Country Flag
How do I change this to inf format?
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
"AutoRun"="set comspec=c:\\windows\\command\\cmd.exe"
"PathCompletionChar"=0x00000009
"CompletionChar"=0x00000009
;


#25
jds

jds

    -DOS+

  • Members
  • PipPipPipPip
  • 603 posts
  • OS:98SE
  • Country: Country Flag
Another alternative CMD.EXE can be found in ReactOS, version 0.3.1 (or earlier, for W9X compatibility).

Neither version supports the "for /f" option. Otherwise, quite handy.

BTW, for the MS (WIN95CMD.EXE) version :

1) Caps Lock is treated as a Shift Lock (bug).

2) This is what I use for the Pipe Work-around (based on Charles Dye) :

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
"AutoRun"="set comspec=e:\\windows\\cmd.exe"
"CompletionChar"=dword:00000009

Joe.

Edited by jds, 26 October 2011 - 03:08 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN