How can I open a command prompt at my current drive in Explorer?
January 8, 2000
A. A. Exactly the same as the previous tip but this time a command prompt for a base drive (which has a separate context menu)
Start the Registry Editor (regedit.exe)
Move to HKEY_CLASSES_ROOTDriveshell
From the Edit menu select New - Key and enter a name of CmdHere (or anything else)
Under the new key select New - Key and enter a name of command (lowercase)
Under the key (CmdHere) double click on (Default) and enter a name that will be displayed when you right click on the directory, e.g. "Command Prompt Here"
As an extra, if you a & to the front of a character it will cause it to be underlined, e.g. "&John Prompt here" would produce John Prompt here.Move to the command key and again double click on (Default) and enter
System32cmd.exe /k cd "%1"
e.g. c:winntSystem32cmd.exe /k cd "%1"Close the registry editor
Below is an inf file that incorporates the creation of the Command Here for drives and directories of you don't have cmdhere.inf that comes with the resource kit. Save it with a .inf extension and then right click on it and select install.
; Command Here
[Version]
Signature = "$Windows NT$"
Provider=%Provider%
[Strings]
Provider="SavillTech Ltd"
[DefaultInstall]
AddReg = AddReg
[AddReg]
HKCR,DirectoryShellCmdHere,,,"Command Here"
HKCR,DirectoryShellCmdHerecommand,,,"%11%cmd.exe /k cd ""%1
HKCR,DriveShellCmdHere,,,"Command Here"
HKCR,DriveShellCmdHerecommand,,,"%11%cmd.exe /k cd ""%1
About the Author
You May Also Like