iEntry 10th Anniversary LinuxHaxor WindowHaxor MacHaxor



Pavs

Using Command Prompt from Any Directory


Windows in it’s default setting doesn’t allow you to CMD from a specific folder by “Right-click”, or any other reasonably easy way. Even doing trivial tasks like moving from one folder to another is no easy task. The best way to do this would be go to Starts –> Run –> CMD –> Ok; than browse to your desired folder. Or you could put a cmd.exe in every single folder. None of the options are very convenient.

We could do a little registry hack to make “CMD Here” option appear in every folder by a simple right click, and it will prompt from the desired folder, like this.

For this hack we have to edit the registry. Go to Start –> Run –> Regedit.

The entry that we will edit is located under, HKEY_CLASSES_ROOT\ Directory\shell, we will navigate into that folder and add a new key called “command”, edit the entry and call it whatever you want. I named it “CMD Here”, which is what it will say when you right click a folder.

Now create another key right under the “command” key with the same name. But the value for this entry would be cmd.exe /k “cd %L, basically it is calling cmd from the given folder.

That’s it! Just close the Regedit window and any other explorer window open. Open a new explorer window and you will see this new option to open command prompt from that folder by right click. If you are a heavy command prompt user you will find this option very useful.

Share and Enjoy:
  • Print
  • email
  • Digg
  • del.icio.us
  • Twitter
  • StumbleUpon
  • Facebook
  • LinkedIn
  • RSS
  • Google Bookmarks
  • HackerNews
  • MySpace
  • Linkter
  • Reddit
  • Mixx

About The Author




    

  • Kevin

    March 25th, 2008 09:47

    It is also fairly quick to open a command prompt and drag-and-drop a folder into the window to paste its path (e.g. type “cd “, drop in a folder).

    Still, I agree “Cmd here” is a useful feature.

  • Killjoy

    August 12th, 2008 11:14

    Thanks for the information. I’ve been using “Open Command Window Here” which is a Microsoft PowerToy for Windows XP. After installing this executable, it gives me the same capabilities as what you described above. Does this registry hack work for all flavors of Windows?

  • Andy

    August 12th, 2008 23:35

    I tried this ‘hack’ but I get a ‘Permission Denied’ error whenever I try to use the ‘CMD here’ option on the right-click menu of a folder.

  • Gav

    August 14th, 2008 02:53

    There’s an easier way without going near the registry or loading any programs.
    - Open My Computer, click Tools -> Folder Options
    - Select the File Types tab
    - Choose (NONE) Folder and click the Advanced button.
    - Click the New button
    - Type Command Prompt in the Action field (or whatever you want)
    - Type cmd.exe in the Application used field
    - Click OK, OK, Close.
    Done.

  • Martin

    November 9th, 2008 07:13

    Pretty nice site, wants to see much more on it! :)

  • john

    December 19th, 2008 21:16

    It\’s a great and valuable site!

  • akash

    April 3rd, 2009 13:06

    hey guys i do hav some junk in my comp….my computer doesnot open.it display message as OS choice menu and when i try any option such as safe mode or normaly boot or last good comfiguration than computer again re start and again same message,,,,,,,any one there to help


Subscribe without commenting


Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.