Click here to Skip to main content
13,195,710 members (72,564 online)
Click here to Skip to main content
Add your own
alternative version


23 bookmarked
Posted 22 Aug 2003

.NET Command Prompt Here

, 22 Aug 2003
Rate this:
Please Sign up or sign in to vote.
Command Prompt Here for VS.NET Users

<!------------------------------- STEP 3 ---------------------------> <!-- Add the article text. Please use simple formatting (


etc) -->


I find the Open Command Window Here utility in the XP Power Toys bundle absolutely indispensable. Put simply, it adds an item to Windows Explorer's context menu that opens a DOS session in the current directory. This article contains and explains two simple registry hacks that add a .NET Command Prompt Here menu item to Windows Explorer's context menu that runs vsvars32.bat and then opens a DOS session in the current directory. I use this in place of the Visual Studio .NET 2003 Command Prompt shortcut installed by VS.NET 2003. It's not magic. Just simple and useful.

Using the code

Unzip Double click on both .reg files contained therein, which should be named  .NET Command Prompt Here - Directory.reg and .NET Command Prompt Here - Drive.reg. This adds the .NET Command Prompt Here menu item that is both described and shown above. When you select the menu item, you get something like the DOS session shown below.

Now you can gacutil and ngen to your heart's content.

Points of Interest

Each .reg script has been tested on several XP Pro systems with VS .NET 2003. The command actually added to the registry reads

cmd /k 
, which uses the VS71COMNTOOLS variable added to the environment variables by VS.NET 2003. I'm not sure whether VS.NET 2002 adds this variable so, if you're still using VS.NET 2002, look at your environment variables and add the appropriate variable or <kludge>hardcode the path</kludge>.

If you actually look into the .reg scripts, you'll see that the command is written in hex(2). This has to do with the fact that the value is REG_EXPAND_SZ types rather than the default REG_SZ . If you're a registry maven, this is all old hat. For me, however, this was all new. Thus ends my first CodeProject article.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralFor VC6.0 Pin
MG Man11-Dec-06 19:28
memberMG Man11-Dec-06 19:28 
Generaluninstall method [modified] Pin
MG Man11-Dec-06 18:29
memberMG Man11-Dec-06 18:29 
GeneralRe: uninstall method Pin
flipdoubt12-Dec-06 3:05
memberflipdoubt12-Dec-06 3:05 
Generalwhidbey version Pin
andy_p3-May-05 4:44
memberandy_p3-May-05 4:44 
GeneralRe: whidbey version Pin
flipdoubt27-Jun-05 2:24
memberflipdoubt27-Jun-05 2:24 
QuestionRe: whidbey version Pin
engfelt27-Mar-06 2:46
memberengfelt27-Mar-06 2:46 
AnswerRe: whidbey version Pin
andy_p27-Mar-06 3:40
memberandy_p27-Mar-06 3:40 
it works as-is for vs2005, but you could change the words on the context menu if you like. The hex is actually the unicode for
"cmd /k "%VS80COMNTOOLS%vsvars32.bat"
which uses the VS80 environment variables.

GeneralNice one Pin
dbvaughan29-Mar-05 14:14
memberdbvaughan29-Mar-05 14:14 
GeneralNice and 2002 .. Pin
hotind12-Nov-03 20:34
memberhotind12-Nov-03 20:34 
GeneralGood Stuff Pin
fbougadou28-Aug-03 5:16
memberfbougadou28-Aug-03 5:16 
GeneralGood stuff Pin
Tim Stubbs26-Aug-03 22:33
memberTim Stubbs26-Aug-03 22:33 
QuestionDOS? Pin
Anonymous24-Aug-03 5:54
sussAnonymous24-Aug-03 5:54 
AnswerRe: DOS? Pin
flipdoubt24-Aug-03 6:05
memberflipdoubt24-Aug-03 6:05 
AnswerRe: DOS? Pin
Anoner25-Aug-03 6:08
sussAnoner25-Aug-03 6:08 
GeneralNice and useful :-) Pin
Nishant S22-Aug-03 19:44
editorNishant S22-Aug-03 19:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171019.1 | Last Updated 23 Aug 2003
Article Copyright 2003 by flipdoubt
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid