In case it's of use to anyone, I've been using the following registry file for a few years. It creates two new right-click menu items for all types of files: "Command" and "Open Its Folder". The first one (Command) opens a command prompt in the selected file's directory. The second one (Open Its Folder) opens a new Explorer window with the current file pre-selected (which is especially useful when done from a FileSelectFile dialog or a Search window).
Quote:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Command]
[HKEY_CLASSES_ROOT\*\shell\Command\command]
@="cmd.exe /k cls \"%1\""
[HKEY_CLASSES_ROOT\*\shell\Open Its Folder]
[HKEY_CLASSES_ROOT\*\shell\Open Its Folder\command]
; This method pre-selects the target file in the new window:
@="explorer.exe /select,\"%1\""
Similarly, here's a registry file that gives each folder a new context menu item that opens a command prompt there:
Quote:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Command]
@=""
[HKEY_CLASSES_ROOT\Directory\shell\Command\command]
@="cmd.exe \\\"%1\\\""