Jump to content

Modified Open Command Window Here tweak


Recommended Posts

Posted (edited)

I have been messing with it a bit, inspired by this post, and here's the simplest version that should work for everyone; it's a bit more aesthetically pleasing than the original, I think, because it looks the same as it would if you opened cmd from run.

It adds "Open Command Window Here" to the right click (context) menu of folders, files, and drives.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\cmd]
@="Open Command Window Here"

[HKEY_CLASSES_ROOT\*\shell\cmd\command]
@="cmd %COMSPEC%"

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Open Command Window Here"

[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd /K cd %L & %%COMSPEC%%"

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="Open Command Window Here"

[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd %COMSPEC%"

A problem I've noticed with this is that files which don't have a program associated with them get the Open Command Window Here option set as the default. This tweak should prevent that, displaying an Open With window instead, but unfortunately it adds it to -all- file types, all the time, so you'll have an extra Open With... option there. I'm also not sure the CLSID is the same for other systems, though I think it should be... any way to find that out?

Anyway, here's the code:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\1st]
@="Open With..."

[HKEY_CLASSES_ROOT\*\shell\1st\command]
@="{09799AFB-AD67-11d1-ABCD-00C04FC30936}"

Edit: and here's the simplest inf file that applies those tweaks, for who cares:

[Version]
Signature = $Windows NT$

[DefaultInstall]
AddReg = Registry

[Registry]
HKCR,*\shell\1st,,,"Open With..."
HKCR,*\shell\1st\command,,,"{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
HKCR,*\shell\cmd,,,"Open Command Window Here"
HKCR,*\shell\cmd\command,,,"cmd %COMSPEC%"
HKCR,Directory\shell\cmd,,,"Open Command Window Here"
HKCR,Directory\shell\cmd\command,,,"cmd /K cd %L & %%COMSPEC%%"
HKCR,Drive\shell\cmd,,,"Open Command Window Here"
HKCR,Drive\shell\cmd\command,,,"cmd %COMSPEC%"

Edited by Ver Greeneyes

Posted

does anyone know how to get things like this to ONLY appear when you hold left shift?

-like the way 'open with' works..

Posted (edited)

i'd like to have cmd here and a few things too as optional right click menu's (that only appear with a hold right shift)

i prefer having it clean most of the time

Edited by bledd
Posted (edited)
Shellext I think (i.e. using a dll)

Right, but which dll, and how would you make the entry? I'd love to have certain stuff only show up when left shift is held as well..

Actually, this thread is a bit off topic now, so I will make a new one in the Windows XP forum, and post the link here when it's ready.

EDIT: Here is the link http://www.msfn.org/board/index.php?showtopic=89311

Edited by Speeddymon

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...