ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

SOLVED: Open command prompt at current directory

<< < (2/5) > >>

daddydave:
In XP I used to add it to the context menu just a registry entry.

AndyM:
Thanks for the help, everyone.

I found out from the comments in this blog (the blog itself wasn't very specific) that Windows 7 (and Vista) already has this built in by following these steps:

1. Select the directory so that it is highlighted
2. Hold Shift and Right Click the directory
3. Select Open Command Window Here
-Deozaan (June 16, 2010, 05:27 PM)
--- End quote ---

I wasn't paying attention (still running XP), but one of the links I checked said something about a registry entry that would show "Open Command Window Here" even when the Shift key wasn't being held down.  If that's of any interest...

Deozaan:
I wasn't paying attention (still running XP), but one of the links I checked said something about a registry entry that would show "Open Command Window Here" even when the Shift key wasn't being held down.  If that's of any interest...
-AndyM (June 16, 2010, 08:34 PM)
--- End quote ---

That does interest me.

I found this one, which adds a "Run Command Prompt as Administrator Here":


--- ---[netshelter][HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Administrator Command Prompt here"
"NoWorkingDirectory"=""
 
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /k \"pushd %L && title Command Prompt\""
 
[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="Administrator Command Prompt here"
"NoWorkingDirectory"=""
 
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /k \"pushd %L && title Command Prompt\""
Does anyone understand this stuff well enough to modify that so it doesn't use administrator privileges? I don't need the elevated privileges.

EDIT: I think I found the answer here, which basically says:

Rename or delete the "Extended" key for both "HKEY_CLASSES_ROOT\Drive\shell\cmd" and "HKEY_CLASSES_ROOT\Directory\shell\cmd" in the registry.

Just tested it and it works in Windows 7 (64-bit) though it should work both 32-bit and 64-bit versions (including Vista).

Thanks for pointing out this option, AndyM!

rjbull:
Windows 7 (and Vista) already has this built in by following these steps:

1. Select the directory so that it is highlighted
2. Hold Shift and Right Click the directory
3. Select Open Command Window Here
-Deozaan (June 16, 2010, 05:27 PM)
--- End quote ---

Just tried it, and it works on Vista Home Premium in a user account with UAC On.  But if you want a DOS prompt in the current directory, you'd have to go up a level then highlight the one you've just come from, because you don't get Open Command Window Here if you right-click on a file.

daddydave:
Windows 7 (and Vista) already has this built in by following these steps:

1. Select the directory so that it is highlighted
2. Hold Shift and Right Click the directory
3. Select Open Command Window Here
-Deozaan (June 16, 2010, 05:27 PM)
--- End quote ---

Just tried it, and it works on Vista Home Premium in a user account with UAC On.  But if you want a DOS prompt in the current directory, you'd have to go up a level then highlight the one you've just come from, because you don't get Open Command Window Here if you right-click on a file.
-rjbull (June 17, 2010, 02:54 PM)
--- End quote ---

You can also Shift-Right Click on a blank space within the current folder

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version