2

For instance, netstat. This doesn't show up when you type help, but netstat /? does provide the information.

Are there any other commands that will not get listed?

Also, the command netstat /? > netstat.txt won't work. Any idea why?
The netstat.txt file is created but remains empty.

I have write-permission on the map and the CMD.EXE is running as admin.

3 Answers 3

7

netstat.exe is a separate executable that lives in C:\Windows\system32 (or at least it does on XP), rather than being a command within cmd.exe.

There will be a large number of other executables in this folder (and others in the Windows tree) that won't show up when you type help from within cmd.exe.

2
  • Would this explain why I can't parse the /? output of those commands to textfiles?
    – KdgDev
    Oct 28, 2009 at 21:30
  • 4
    Use "netstat /? 2>netstat.txt " . The usage information is sent to stderr, not stdout.
    – Snark
    Oct 28, 2009 at 21:34
2

(I was going to answer this, but then I did some research for you and this is not what I first thought, so +1 as I have learnt a bit here!)

When you type help, it launches C:\Windows\SysWOW64\help.exe (or guessing, C:\Windows\System32\help.exe on 32-bit Windows)

I guess that listing EVERY executables would simply result in a huge list that most people will never read, so they only list built-in functions of the command prompt (if, for, goto etc.) and other commands which are generally used all the time.

FYI, if you want to see what is a "built in" command and what is a program, you can create a empty folder and navigate to it, then type

path=0

next, try any of the commands, if like typing if works, it is built-in, if typing help does not work, you know it was a command located somewhere else (again +1, I thought help was always a built-in command!)

1
  • It'll always run help.exe in C:\windows\system32\help.exe unless you're using the 32-bit cmd.exe on 64-bit Windows, since SysWOW64 is for 32-bit binaries. And the term for those "built-in" things is internal command which can be checked simply by running where command and see no file output
    – phuclv
    Aug 15, 2018 at 9:13
2

I assume most (if not all) of the commands listed under cmd.exe's help are basic/internal commands which are built-in cmd.exe directly.

For instance, try and look for a file named del.exe or del.com, or even a dir.exe or dir.com -- chances are that you won't find it (try: dir /s LookForThisFile.ext). I bet 10$ that most if not all the commands listed under help are 'internal' to cmd and not a binary by itself.

This way of doing things is also used with bash, where help is used to get help on pretty much any keyword provided by the bash scripting language.

1
  • you can run for /f %f in ('help') do @where %f to get which commands in help are internal or external and count accordingly. In my case I got 57 internal commands and 40 external ones
    – phuclv
    Aug 15, 2018 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .