Click here to Skip to main content
6,292,811 members and growing! (11,337 online)
Email Password   helpLost your password?
Languages » C# » PInvoke     Intermediate

Command Prompt Explorer Bar

By Pavel Zolnikov

This tool extends explorer with functionality of a command prompt. Implemented as a band object completely in C#. Demonstrates COM Interop and P/Invoke, windows hooking and API interception. Finally you can run all these .Net SDK tools and ‘Hello World!’ programs without leaving explorer shell.
C#, VC7.NET 1.0, Win2K, WinXP, Dev
Posted:30 May 2002
Updated:10 Jun 2002
Views:801,264
Bookmarked:295 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
246 votes for this article.
Popularity: 11.26 Rating: 4.71 out of 5
7 votes, 4.0%
1
1 vote, 0.6%
2
1 vote, 0.6%
3
13 votes, 7.4%
4
153 votes, 87.4%
5

Introduction

The Command Prompt Explorer Bar is a small tool that extends Windows Explorer.

Version 1.1 is now available.

Ever tried to run one of those console programs ("Hello World!" to name a few), .BAT, .VBS or .JS scripts just to see black window popping up and disappearing? I did. Especially after I started using .Net framework I find myself doing this more often. No wonder - with all this ALs , NGENs and TLBIMPs. So if you are like me then this tool is right for you. Next time you need to run a program without GUI, just press the 'Ctrl+M' key combination in your explorer. A command prompt will start and appear automatically. Its current directory will be exactly the same as the current path you are browsing. And better yet the console will appear inside your explorer window - like any other explorer bar does - 'History', 'Favorites', 'Folders' etc. Now you can have the best of both worlds combined together - easy and fast navigation of explorer and power of batch processing of the command prompt. Or should I say Command Prompt Explorer Bar:

Well, that is how it looks like. Isn't it a beauty?

You may have noticed a toolbar on the left of the console window. I tried to put some nice timesaving features there. The most powerful is a button with a 'Script' icon on it. It has a drop down menu where you can select a command you like to be executed. It even knows how to substitute '{0}' for the name of the current files selected in explorer. Here is when it can be useful. Let's say you want to install your assembly into a 'Native Images Cache'. With Command Bar it is as simply as selecting your assembly in explorer and clicking on 'ngen {1}' menu item. It also works just fine for multiple selected files (use {0} instead). Now you can compile your .cs or .vbs files without leaving a comfortable explorer shell. And yes, you can change this menu and scripts the way you like them. It is as simple as editing a text file in a Notepad.

And here is another (besides pressing 'Ctrl+M') way of starting this tool:

I hope you'll enjoy this little tool. Send me your comments, requests and bug reports to PavelZolnikov@yahoo.com.

History

  • 5/31/2002, 1.0 - original version.
  • 6/11/2002, 1.1 - bug fixes. NOTE: if you were using version 1.0 and have customized macro.xml file, you might want to save its backup version somewhere before uninstalling.
    • New setup. Hopefully without issues like in previous version. Thanks to Michael Dunn for his tip.
    • Fixed an issue with CMD.EXE failing to start. CreateProcess interception is now scoped by instances of Folder Windows and enabled only if CommandBar is visible. 'Launch folder windows in a separate process� is no more required.
    • Integrated keyboard focus with explorer. Now Command Prompt window is reachable through Tab and Shift+Tab keys.

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

Pavel Zolnikov


Member

Occupation: Web Developer
Location: United States United States

Other popular C# articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 250 (Total in Forum: 250) (Refresh)FirstPrevNext
GeneralJust a size glitch Pinmembergabrielmaldi5:35 4 Apr '09  
GeneralPerfect idea! Pinmembermichaelogical10:59 9 Mar '09  
GeneralWin XP SP3 x86 edition on 64 Bit Hardware - Crashes Explorer Pinmembergutharius18:26 9 Jan '09  
GeneralWorks in IE but not Explorer when installing on Windows XP 64-bit Pinmemberpashleb1:26 8 Jan '09  
GeneralRe: Works in IE but not Explorer when installing on Windows XP 64-bit PinmemberRuss McMackin9:33 19 Feb '09  
GeneralXP x64 problem. Pinmemberoleg6310:57 2 Oct '08  
GeneralWhat a nice and nicer idea!!!! Pinmemberrahulja3:59 10 Sep '08  
QuestionVista Installation Issues - Error Code 2869 and Error 1304: Error writing to file zcommon.dll Pinmemberpicardo11:21 29 Aug '08  
AnswerRe: Vista Installation Issues - Error Code 2869 and Error 1304: Error writing to file zcommon.dll PinmemberMember 41183884:50 26 Oct '08  
QuestionControlling Sidebar from BHO PinmemberAlex Shneyder18:24 9 Oct '07  
QuestionHow to display Explorer Bar Pinmembervikrant kpr11:50 7 Sep '07  
AnswerRe: How to display Explorer Bar Pinmembertoonen2612:29 17 Oct '07  
GeneralNeed drag and drop Pinmembersinbao20:05 18 Jul '07  
GeneralCauses WinMerge to fail. PinmemberUKCodeMonkey0:25 17 Jul '07  
GeneralBest Power toy ever! Pinmemberkerneljag19:38 23 Jan '07  
QuestionPowerShell Support Pinmemberirishjd6:05 13 Dec '06  
QuestionMultiple explorer windows with command prompt? PinmemberNathanPalmer8:09 30 Nov '06  
Generalvisual 2005 Pinmemberhezyz12:30 13 Nov '06  
GeneralThe best PinmemberZabersoft-ahj15:48 10 Aug '06  
GeneralBugs [modified] PinmemberThe_Mega_ZZTer10:42 2 Aug '06  
GeneralWinXP, VisStudio 2005 -- no joy PinmemberNumber813:48 1 Jul '06  
GeneralRe: WinXP, VisStudio 2005 -- no joy PinmemberThe_Mega_ZZTer13:52 2 Aug '06  
GeneralAlternative tool Pinmembermustsee14:56 20 Apr '06  
GeneralFocus Hotkey please! Pinmemberduffman07113:38 17 Apr '06  
GeneralDamn! PinmemberBassam Abdul-Baki18:10 3 Mar '06  

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

PermaLink | Privacy | Terms of Use
Last Updated: 10 Jun 2002
Editor: Chris Maunder
Copyright 2002 by Pavel Zolnikov
Everything else Copyright © CodeProject, 1999-2009
Web13 | Advertise on the Code Project