Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
This add to the registry please backup registry before using.
Save with vbs extension and click on the file.
Type h command ie. h dir to display dir syntax.
Type h ntcmds to display list of dos commands---------------------
' Adds a registry entry that creates a Doskey macro in each command prompt session.
' The Doskey macro, called H, allows you to call up GUI help about commands.Option Explicit
Dim intAllUsers, intOverWrite, strNewValue, strOldValue, strRegKey, WshShellOn Error Resume Next
intAllUsers = MsgBox ("Do you want to make the H (command-line help) macro available
to all users?", vbYesNoCancel, "Command-line Help")
Select Case intAllUsers
Case 6 'Yes (use HKLM)
strRegKey = "HKEY_LOCAL_MACHINE\Software\Microsoft\CommandProcessor\AutoRun"
Case 7 'No (use HKCU)
strRegKey = "HKEY_CURRENT_USER\Software\Microsoft\CommandProcessor\AutoRun"
Case 2 'Cancel
WScript.Quit
End SelectSet WshShell = WScript.CreateObject("WScript.Shell")
strOldValue = WshShell.RegRead(strRegKey)If strOldValue <> "" Then
intOverwrite = MsgBox ("The AutoRun key already contains the value '" &strOldValue & "'" & vbNewLine & "Do you want to overwrite?", vbYesNo, "Command-line
Help")
If intOverWrite <> 6 Then WScript.Quit
End IfstrNewValue = "doskey h=%systemroot%\pchealth\helpctr\binaries\helpctr /url
ms-its:%systemroot%\Help\ntcmds.chm::/$1.htm"
WshShell.RegWrite strRegKey, strNewValue, "REG_SZ"Select Case intAllUsers
Case 6 ' Added to HKLM
WScript.Echo "The command-line help macro is now enabled in all newcommand prompt windows."
Case 7 ' Added to HKCU
WScript.Echo "The command-line help macro is now enabled in all newcommand prompt windows when logged on as the current user."
End Select

Thats not a batch file, its a VBSript. If your trying to run the script, you have to change the file extension to .vbs. Then just double click the icon or from the command line, use the wscript <filename.vbs> or cscript <filename.vbs>.
I have NOT lost my mind — I have it backed up on tape somewhere

So what is your question? You want to know what it does?
I have NOT lost my mind — I have it backed up on tape somewhere

Hi
No it's a VBScript to help other people learn the MsdDos commands, maybe I did'nt explain very well.
If you save it with a vbs extension and double click on it, it allows you to type
"h MsDosCommand" at the command prompt to display the MsDos commands using Windows Help program.
ie "h dir", "h attrib" ect. or "h ntcmds" for a full list of commands.
I thought other people might find it usefull.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |