Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Command Prompt List

4 views
Skip to first unread message

Mike Lynch

unread,
Dec 7, 2002, 8:57:33 AM12/7/02
to
Does anyone know where I can obtain a fairly complete list
of command prompts and their functions. Thanks, MIKE

Dave Patrick

unread,
Dec 7, 2002, 10:18:13 AM12/7/02
to
For Windows 2000
Create a shortcut with a "Target" value of;
%windir%\hh.exe Ms-its:%windir%\help\windows.chm::/ntcmds.htm

For Windows XP
Create a shortcut with a "Target" value of;
%windir%\hh.exe Ms-its:%windir%\help\ntcmds.chm::/ntcmds.htm

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000]

Mark V

unread,
Dec 7, 2002, 10:22:53 AM12/7/02
to
"Mike Lynch" <Mike...@hotmail.com> wrote in news:072901c29df8
$9786f690$d4f82ecf@TK2MSFTNGXA11:

> Does anyone know where I can obtain a fairly complete list
> of command prompts and their functions. Thanks, MIKE
>

prompt /?
or
Help systems, Index, Prompt command

Dana

unread,
Dec 7, 2002, 11:36:53 PM12/7/02
to
"Dave Patrick" <ma...@Nospam.DSPatrick.com> wrote in message
news:u2j6bPgnCHA.2452@TK2MSFTNGP10...

> For Windows 2000
> Create a shortcut with a "Target" value of;
> %windir%\hh.exe Ms-its:%windir%\help\windows.chm::/ntcmds.htm

Excellent tip Dave.
Now I have a question. Just how did you come up with that. I found the
ntcmds.htm file. But what is %windir%\hh.exe Ms-its supposed to be doing.
Thanks for the tip, as it works great.

Dave Patrick

unread,
Dec 7, 2002, 11:39:56 PM12/7/02
to
This link may help.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1start.asp


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000]

Pete Lees

unread,
Dec 8, 2002, 11:31:42 AM12/8/02
to
Dana,

> Now I have a question. Just how did you come up with that. I found the
> ntcmds.htm file. But what is %windir%\hh.exe Ms-its supposed to be doing.

"%windir%" is an environment variable that specifies the path to your
Windows directory (for example, C:\Winnt).

"hh.exe" is the executable with which Windows opens compiled HTML Help
(.chm) files.

"ms-its" is a protocol with which you can access .chm files and
particular HTML files inside them. You can read more about this in
Microsoft Knowledge Base article 235226.

http://support.microsoft.com/default.aspx?scid=KB;en-us;q235226

The "::/ntcmds.htm" bit that follows the name of the .chm file is
specifying the internal path to a particular HTML file inside the
.chm.

If you right-click any topic in an HTML Help window and select
Properties from the context menu, the Address field shows the absolute
path to that topic.

Finally, Windows automatically looks in %windir\help for .chm files,
so you should be able to omit the path from your command. For example,
this command should work OK:

hh ms-its:windows.chm::/ntcmds.htm

Pete

Dana

unread,
Dec 8, 2002, 11:42:57 PM12/8/02
to
"Pete Lees" <PD....@btinternet.com> wrote in message
news:c8bde505.0212...@posting.google.com...

Thanks for the explanation.


Dana

unread,
Dec 8, 2002, 11:43:32 PM12/8/02
to
"Dave Patrick" <ma...@Nospam.DSPatrick.com> wrote in message
news:e6Y0SSnnCHA.1604@TK2MSFTNGP08...

> This link may help.
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/ht
ml/vsconHH1start.asp
>
>
> --
> Regards,

Thanks for the link. Good stuff there.

Dana

unread,
Dec 8, 2002, 11:53:08 PM12/8/02
to
"Pete Lees" <PD....@btinternet.com> wrote in message
news:c8bde505.0212...@posting.google.com...
Since I have been playing around with scripting, I have come up with this.

Set ws = WScript.CreateObject ("WScript.Shell")
ws.Run("hh ms-its:windows.chm::/ntcmds.htm")

Saved as a .vbs and it works great.
Once again thanks for the help.


Ritchie

unread,
Dec 9, 2002, 4:38:04 PM12/9/02
to
"Mike Lynch" <Mike...@hotmail.com> wrote in message news:072901c29df8$9786f690$d4f82ecf@TK2MSFTNGXA11...

> Does anyone know where I can obtain a fairly complete list
> of command prompts and their functions. Thanks, MIKE

You might want to try this script:-

============================ start cmdhelp.cmd =============================
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:;
:;Generates an indexed command reference in HTML format for the current
:;operating system. For NT4/2K/XP.
:;Ritchie Lawrence, 2002-12-07. Version 1.1.
:;
:; CMDHELP [out.htm]
:;
:; [out.htm] File to receive html output. If omitted stdout is used
:;
:; Eg. CMDHELP ntcmds.html
:; CMDHELP >xpcmds.htm
:: CMDHELP >"2000 cmds.htm"&start "" "2000 cmds.htm"
:;
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off&setlocal ENABLEEXTENSIONS

:: Display help if required, then exit with errorlevel 1
echo:%1|findstr/i "? \/? -? -h --h -help --help" >nul&&(
for /f "tokens=1* delims=:;" %%a in ('findstr/b /n /c:":;" %~f0') do (
>&2echo/%%b
)
2>nul>&2dir:&goto :EOF
)

:: If %1 specified, set the file to zero bytes and check success
if "%~f1"=="" (set "out=") else (
set "out=>>"%~f1""&copy nul "%~f1" >nul||goto :EOF
)

:: HELP pages are dictated by OS and not CMD.EXE version!
set v=XP&for /f "tokens=7 delims=version. " %%a in ('help ver') do set v=%%a

:: Start custom commands with ':!' followed by display name and help syntax
:! PING PING -?
:! NETSTAT NETSTAT -?
:! NBTSTAT NBTSTAT -?
:! TRACERT TRACERT -?
:! ROUTE ROUTE -?
:! ARP ARP -?
:! NET NET /?
:! IPCONFIG IPCONFIG /?

>&2echo/Initialising array...
set i=1001&for /f "delims==" %%a in ('set Array 2^>nul') do set %%a=

>&2echo/Adding HELP commands to array...
set skip=&if "XP"=="%v%" set "skip="skip=1""
for /f %skip% %%a in ('help^|findstr/b /v /c:" "') do (
set Data=%%a HELP %%a&call :AddCmd
)

>&2echo/Adding CUSTOM commands to array...
for /f "tokens=1*" %%a in ('findstr/b ":! " %~f0') do (
set Data=%%b&call :AddCmd
)

>&2echo/Building HTML header...
%out% echo/^<html^>^<head^>
%out% echo/^<title^>Windows %v% Command Reference^</title^>
%out% echo/^</head^>^<a name="top"^>

>&2echo/Building HTML index...
%out% echo/^<table width="650"^>^<tr bgcolor="#CCCCCC"^>
%out% echo/^<td colspan="6"^>^<div align="center"^>^<code^>^<strong^>
%out% echo/^<font size="4"^>Windows %v% Command Reference
%out% echo/^</font^>^</strong^>^</code^>^</div^>^</td^>^</tr^>
set j=0&for /f "tokens=2 delims== " %%a in ('set Array^|sort/+10') do (
set Data=%%a&call :MakeIdx
)
%out% echo/^</table^>

>&2echo/Building HTML content...
%out% echo/^<pre^>
for /f "tokens=2* delims== " %%a in ('set Array^|sort/+10') do (
set Name=%%a&set HCmd=%%b&call :MakeCnt
)
%out% echo/^</pre^>^</body^>^</html^>
>&2echo/Complete.&goto :EOF

:AddCmd
set Array%i%=%Data%&set /a i+=1&goto:EOF

:MakeIdx
%out% (if "%j%"=="6" echo/^</tr^>&&set j=0)
%out% (if "%j%"=="0" echo/^<tr^>)
%out% echo/^<td width="100"^>^<code^>
%out% echo/^<a href="#%Data%"^>%Data%^</a^>^</code^>^</td^>
set /a j+=1&goto :EOF

:MakeCnt
%out% echo/^<hr size="1"^>^<p^>^<b^>
%out% echo/^<a name="%Name%" href="#top"^>%Name%^</a^>^</b^>^<br^>
>&2echo/Adding %Name%...&
%out% %HCmd% 2>&1
%out% echo/^</p^>&goto :EOF
=============================== end cmdhelp.cmd =============================

Known issues: Last few lines of the FINDSTR read:-

\ Word position: end of word

They should read:-

\<xyz Word position: beginning of word
xyz\> Word position: end of word

--
Ritchie


Walter Briscoe

unread,
Dec 10, 2002, 5:02:42 AM12/10/02
to
In message <at32hc$10aa3g$1...@ID-156657.news.dfncis.de> of Mon, 9 Dec 2002
21:38:04 in microsoft.public.win2000.cmdprompt.admin, Ritchie <qiournvdl
irhjgiu...@hotmail.com> writes

>"Mike Lynch" <Mike...@hotmail.com> wrote in message news:072901c29df8
>$9786f690$d4f82ecf@TK2MSFTNGXA11...
>> Does anyone know where I can obtain a fairly complete list
>> of command prompts and their functions. Thanks, MIKE
>
>You might want to try this script:-
>
>============================ start cmdhelp.cmd =============================
Your script is magnificent! Had I been designing it, I would have
mandated a target file and not supported writing to stdout so that
cmdhelp without arguments would tell how to use it.

[snip]


>:: If %1 specified, set the file to zero bytes and check success
>if "%~f1"=="" (set "out=") else (
> set "out=>>"%~f1""&copy nul "%~f1" >nul||goto :EOF

I was interested some time ago in a variable which expanded to nothing
or a redirector in a W9X COMMAND.COM. I have just confirmed that your
technique does not work there.

A cracking piece of work!
--
Walter Briscoe

Ritchie

unread,
Dec 10, 2002, 4:28:15 PM12/10/02
to
"Walter Briscoe" <wbri...@ponle.demon.co.uk> wrote in message news:L1RxNzAC...@ponle.demon.co.uk...

> >============================ start cmdhelp.cmd =============================
> Your script is magnificent! Had I been designing it, I would have
> mandated a target file and not supported writing to stdout so that
> cmdhelp without arguments would tell how to use it.

Well think of my version as an enchanced version of yours :)

> > set "out=>>"%~f1""&copy nul "%~f1" >nul||goto :EOF
> I was interested some time ago in a variable which expanded to nothing
> or a redirector in a W9X COMMAND.COM. I have just confirmed that your
> technique does not work there.

Yes, CMD.EXE is a significant improvement over COMMAND.COM.

> A cracking piece of work!

Thank you. I learnt a few useful techniques whilst getting it to work on
NT4, Win2000 _and_ XP.

--
Ritchie


0 new messages