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]
> 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
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.
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000]
> 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
Thanks for the explanation.
Thanks for the link. Good stuff there.
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.
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""© 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
[snip]
>:: If %1 specified, set the file to zero bytes and check success
>if "%~f1"=="" (set "out=") else (
> set "out=>>"%~f1""© 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
Well think of my version as an enchanced version of yours :)
> > set "out=>>"%~f1""© 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