Click here to Skip to main content
6,595,854 members and growing! (18,085 online)
Email Password   helpLost your password?
General Programming » Macros and Add-ins » Visual Studio .NET Addins     Intermediate

.NET Command Prompt Here

By flipdoubt

Command Prompt Here for VS.NET Users
VC7, VC7.1, Windows, Visual Studio, Dev
Posted:22 Aug 2003
Views:64,405
Bookmarked:19 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
21 votes for this article.
Popularity: 5.53 Rating: 4.19 out of 5
2 votes, 9.5%
1

2
1 vote, 4.8%
3
4 votes, 19.0%
4
14 votes, 66.7%
5

Introduction

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 dotNET_cmd_here.zip. 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 "%VS71COMNTOOLS%vsvars32.bat" , 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.

License

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

flipdoubt


Member

Occupation: Web Developer
Location: United States United States

Other popular Macros and Add-ins articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 15 of 15 (Total in Forum: 15) (Refresh)FirstPrevNext
GeneralFor VC6.0 PinmemberMG Man20:28 11 Dec '06  
Generaluninstall method [modified] PinmemberMG Man19:29 11 Dec '06  
GeneralRe: uninstall method Pinmemberflipdoubt4:05 12 Dec '06  
Generalwhidbey version Pinmemberandy_p5:44 3 May '05  
GeneralRe: whidbey version Pinmemberflipdoubt3:24 27 Jun '05  
QuestionRe: whidbey version Pinmemberengfelt3:46 27 Mar '06  
AnswerRe: whidbey version Pinmemberandy_p4:40 27 Mar '06  
GeneralNice one Pinmemberdbvaughan15:14 29 Mar '05  
GeneralNice and 2002 .. Pinmemberhotind21:34 12 Nov '03  
GeneralGood Stuff Pinmemberfbougadou6:16 28 Aug '03  
GeneralGood stuff PinmemberTim Stubbs23:33 26 Aug '03  
GeneralDOS? PinsussAnonymous6:54 24 Aug '03  
GeneralRe: DOS? Pinmemberflipdoubt7:05 24 Aug '03  
GeneralRe: DOS? PinsussAnoner7:08 25 Aug '03  
GeneralNice and useful :-) PineditorNishant S20:44 22 Aug '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 22 Aug 2003
Editor: Nishant Sivakumar
Copyright 2003 by flipdoubt
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project