Ramblings of a DBA

Tara Kizer
posts - 166, comments - 837, trackbacks - 75

My Links



Search this Blog


Post Categories


Open Command Window Here

Most of you probably already have done this, but just in case you haven't and find yourself frequently using cmd to run commands such as sqlcmd, you will find this registry "hack" useful. 

I use sqlcmd on a weekly, if not daily, basis.  I'm constantly switching directories to where my scripts are.  Rather than switching directories in cmd, I can instead use the "Open Command Window Here" option in Windows Explorer.  To get this option on your machine, save the below as a reg file and then double-click on it:

Windows Registry Editor Version 5.00

@="Open Command Window Here"

@="cmd.exe /k \"cd %L\""

@="Open Command Window Here"

@="cmd.exe /k \"cd %L\""

After you've modified the registry, open up Windows Explorer, right click on a directory, and then select the new option.  Notice how a cmd window opens in the requested directory.

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system.  Use the information provided at your own risk.

Print | posted on Friday, June 13, 2008 12:19 PM | Filed Under [ Other ]



# re: Open Command Window Here

For the lazy, if you're using windows xp, there's a powertoys installer that will do this for you.

6/26/2008 4:41 PM | Ron
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET