0

In Linux, I can use man ls to get help, and I know that the help files for the ls command are stored in the "man" folder. In Windows CMD, I can use dir /? to get help, but where are the help files for CMD commands stored?

Eryk Sun
  • 29,588
  • 3
  • 76
  • 95
Oral Resu
  • 29
  • 3
  • I also don't know where commands bins are stored. there is a folder system32 which stores some of the bins like cacls but not all commands are there. where are other commands in windows 10 – Oral Resu May 10 '19 at 15:38
  • 1
    Internationalized message strings are stored in MUI (multilingual user interface) files in a subdirectory named for the locale. For example, for US English, we have "%SystemRoot%\System32\en-us\cmd.exe.mui". The message number for the `DIR` help string is 0x2382. You can get this message by loading cmd.exe via `LoadLibraryExW` with the flag `LOAD_LIBRARY_AS_DATAFILE`. Pass the address of this mapped file to `FormatMessageW` with the flag `FORMAT_MESSAGE_FROM_HMODULE`, the message ID (e.g. 0x2382), and the language ID. The system uses the language ID to look for the locale-specifc MUI file. – Eryk Sun May 10 '19 at 21:06
  • If you want to read about `cmd.exe` internal commands or console applications installed by default with Windows stored in `%SystemRoot%\System32` (x64 executables on Windows x64, x86 executables on Windows x86) and `%SystemRoot%\SysWOW64` (x86 executables on Windows x64) I recommend to take a look on Microsoft's documentation for [Windows Commands](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands) or even better [SS64.com - A-Z index of the Windows CMD command line](https://ss64.com/nt/) which is more complete. – Mofi May 11 '19 at 08:41

2 Answers2

0

Your question basically is if you know a command, then you want to find that binary file's path. Which is equivalent to the question:

Is there an equivalent of 'which' on the Windows command line?

Please look at the following answer in the above question https://stackoverflow.com/a/27140194

Avinash Dhinwa
  • 320
  • 1
  • 11
0

In cmd, there are internal commands and external commands. Internal commands reside in cmd.exe, external commands are executables.

The help for internal commands also is inside cmd.exe, the help for external commands is in their .EXE.

See here for details.

Stephan
  • 47,723
  • 10
  • 50
  • 81
  • The message table with help messages is usually in a MUI file nowadays, not in the EXE itself. The OP seems to be looking for the equivalent of `man` in the classic Windows command line, but there is nothing like that. There's "help.exe". Its message table has brief descriptions of common internal and external commands (only 86 commands), and it displays the full help by running the command via the shell with `/?` appended, e.g. `cmd /c dir /?`. – Eryk Sun May 11 '19 at 00:38