Make DOS windows ubiquitous

Source: Internet
Author: User
Keywords Select not EXE registry if
Often friends with the DOS command line know that every time you start a command prompt, the default is the root directory of the system disk, and if you need to go to a multi-level subdirectory, it is painful: you need to keep using the CD command for directory switching, very troublesome, And if you encounter long file names or Chinese directory names, it's easier to make mistakes. Is there a good way to generate a DOS command line in the desired directory path?  The answer is yes, the use of a class of software such as PowerToys can be easily achieved, but this article is not the use of software methods, but a few "unarmed" method, I hope to provide you with another way to solve the problem.





Several methods, this is the way to solve the problem: if you need to use the command line in a folder, just right-click and select the appropriate command in the Windows Explorer graphical interface (the name can start on your own) without having to switch into the layers directory.   The following is a detailed description of the implementation method.





Import reg File Method


  


Open Notepad, enter the following in the text, and try to avoid typos:





Windows Registry Editor Version 5.00





[Hkey_classes_rootdirectoryshellcmd]





@= "Open command line window here"





[Hkey_classes_rootdirectoryshell





Cmdcommand]





@= "cmd.exe/k" CD%L ""


Note that there must be a blank line in the middle of paragraph two, as shown in Figure 1, which is saved as the "Use command line. reg" file when finished. Save by selecting the Save As command from the File menu in Notepad, and in the dialog box shown in Figure 2, select the Save type as all files and save it in file name by entering the form file name. extension. Then double-click to run this reg file for import, after the import is complete, and then find a deep folder right click, how, is not the "Use command line" option?

Modify Registry

Enter Regedit in Start run, open Registry Editor, navigate to the "Hkey_classes_rootfol-dershell" primary key, and then right-click on the shell item, and select Create a new item and name the new item "MS-DOS." Then click the right mouse button on the newly built "MS-DOS" button, select New Item, name the new item "command", and then select this command subkey, in the right window of Registry Editor, double-click Default under Name, In the numerical data input DOS command line in the directory, because the author uses XP system, so fill in "D:windowssys-tem32cmd.exe" (Figure 3, you can fill in according to their actual situation), and then click "OK", close the Registry Editor. The following test, after entering the Tools directory in the Windows Explorer D disk, right-click and select "MS-dos" commands, "d:tools〉" appears. The
Install INF file Method

installs the INF file to achieve the same effect. Open the Notepad file below and enter the following code:

[Version]

signature= "$CHICAGO $"

[Cmdhereinstall]

CopyFiles =  CMDHERE.FILES.INF

AddReg = Cmdhere.reg

[DefaultInstall]

CopyFiles = CmdHere.Files.Inf

AddReg = Cmdhere.reg

[DefaultUninstall]

DelFiles = CmdHere.Files.Inf

DelReg = Cmdhere.reg
br> [SourceDisksNames]

55= "CMD Prompt Here", "", 1

[SourceDisksFiles]

cmdhere.inf=55

[ DestinationDirs]

Cmdhere.files. INF =

[CmdHere.Files.Inf]

cmdhere.inf

[Cmdhere.reg]

Hklm,%udhere%,displayname,, "% Cmdherename% "

hklm,%udhere%,uninstallstring," Rundll32.exe syssetup.dll,setupinfobjectinstallaction DefaultUninstall 132%17%cmdhere.inf "

hkcr,directoryshellcmdhere,,,"%cmdhereaccel% "

HKCR, directoryshellcmdherecom-

Mand,,, "%11%cmd.exe/k cd" "%1" "

Hkcr,driveshellcmdhere,,,"%cmdhereaccel % "

Hkcr,driveshellcmdherecommand,,,"%11%cmd.exe/k cd ""%1 ""

[Strings]

cmdherename= "cmd  Prompt here PowerToys '

cmdhereaccel= ' CMD &prompt here

udhere= ' softwaremicrosoftwindows

Currentversionuninstallcmdhere

Note that there must be a blank line between the pieces of code, which must be in strict accordance with the format above. Save As Cmdhere.inf file when you have finished entering. Then right-click the file and select the Install command (Figure 4), which adds a cmd Prompt here command for the right mouse button. Note: This method is applicable to operating systems such as winnt/xp/2003, and if you are using a Win9x or WinME system, you need to replace the above Windows NT with Chicago.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.