Right Click and Open a Command Prompt
In one of our current projects, we are building .Net Class Libraries that will be integrated into an ASP.Net web site.
The most laborious task occurs after every major change to a Class Library — we need to run a command line script that registers that DLL with the OS. Unfortunately, the folder that the DLL resides in is 5 levels down and on top of that the script name is 30 characters long — and that does not include the command line parameters. My goal was to come up with a method that would allow me to right click on a folder and have the option to open a command prompt in this folder. Microsoft has a powertoy that you can install that will accomplish this. But, if you are feeling a little adventurous, you can try the following method.
*** NOTE: This method requires editing your system registry. If you are not comfortable with editing your registry, I do not recommend that you use this method. ***
1. Open regedit.exe
2. Navigate to HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
3. Create a new key called Open Command Prompt
4. Create a default value of Open a Command Prompt Here
5. Create a new key called Command under the Command Prompt key
6. Your default value should be cmd.exe /k pushd %L





Leave a Reply