tags:

views:

555

answers:

2

Microsoft's powertoy is relatively well known. But it requires you to open a cmd one level above, from where you'd usually like. So I found this nice app, CmdOpenInstall (let's make the man some traffic :-) - it enables you to open cmd in the current directory.

Is there a way to assign a keyboard shortcut to the command (which appears on right click menu) ? How ?

p.s. I know this is maybe not a strict programing subject, but I still think it has more chances of being answered here then on SF.

A: 

If you find the context menu entry in the registry (I think it would be in HKEY_CLASSES_ROOT\Folder\shell somewhere), you can prefix the character you want as hotkey in that menu with a & to force it as keyboard accelerator.

But apart from that you can't (at least not without addditional tools I don't know any of) make direct keyboard shortcuts to functions in a context menu. But I think something like Menu key and another letter comes close enough in everyday use.

Joey
Yes, this sounds like a good idea. However, the CmdOpen doesn't seem to have anything recognizable in the registry (it doesn't require you to click on folder to open a cmd prompt, ... you can click on white area in the folder).
ldigas
Ah, sorry, it's a shell extension. That means all you can see in the registry is the GUID of it. Didn't look at the page earlier. But you can probably grab the source and modify it. Finding the strings in there shouldn't be too difficult.
Joey
A: 

Here are the registry keys I use to easily open command windows. Here 'C' is the shortcut key.

To use, save to a .reg file and merge into your registry.

Windows Registry Editor Version 5.00
;Right click on folder and open up command window
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd1]
@="Open &Command Prompt Here"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd1\command]
@="cmd.exe /k pushd \"%L\""


;Right click on any file and open up command window
[HKEY_CLASSES_ROOT\*\shell\cmd1]
@="Open &Command Prompt Here"

[HKEY_CLASSES_ROOT\*\shell\cmd1\command]
@="cmd.exe %1"
sideproject