Click here to Skip to main content
15,126,498 members
Articles / Programming Languages / C#
Article
Posted 30 May 2002

Stats

1.4M views
23.8K downloads
354 bookmarked

Command Prompt Explorer Bar

Rate me:
Please Sign up or sign in to vote.
4.93/5 (184 votes)
10 Jun 20023 min read
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.

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:

Image 1

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:

Image 2

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

Share

About the Author

Pavel Zolnikov
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
GeneralRe: WinXP, VisStudio 2005 -- no joy Pin
The_Mega_ZZTer2-Aug-06 13:52
MemberThe_Mega_ZZTer2-Aug-06 13:52 
GeneralAlternative tool Pin
mustsee20-Apr-06 14:56
Membermustsee20-Apr-06 14:56 
GeneralFocus Hotkey please! Pin
Chris DeLaney17-Apr-06 13:38
MemberChris DeLaney17-Apr-06 13:38 
GeneralDamn! Pin
Bassam Abdul-Baki3-Mar-06 18:10
professionalBassam Abdul-Baki3-Mar-06 18:10 
QuestionIsolate the Prompt Control Pin
Bruno R. Figueiredo1-Feb-06 8:11
MemberBruno R. Figueiredo1-Feb-06 8:11 
AnswerRe: Isolate the Prompt Control Pin
The_Mega_ZZTer2-Aug-06 13:44
MemberThe_Mega_ZZTer2-Aug-06 13:44 
GeneralNify piece of software Pin
JQLD20-Nov-05 6:53
MemberJQLD20-Nov-05 6:53 
QuestionHow to debug this? Pin
VC Sekhar Parepalli20-Oct-05 9:51
MemberVC Sekhar Parepalli20-Oct-05 9:51 
Hi there,
am a new bee to shell-extension projects. could any one please provide some steps on how to debug this. am just looking to understand the logic/flow.

Thanks,

Sekhar
AnswerRe: How to debug this? Pin
sxwsws16-Nov-05 7:36
Membersxwsws16-Nov-05 7:36 
Generalthe best power tool i have found Pin
Anonymous4-Oct-05 7:15
MemberAnonymous4-Oct-05 7:15 
Generalmake the prompt do other stuff Pin
Anonymous1-Oct-05 13:53
MemberAnonymous1-Oct-05 13:53 
QuestionMessageBox kills toolbar buttons Pin
wimix1-Oct-05 8:32
Memberwimix1-Oct-05 8:32 
Generalcauses explorer crash on Win2k Pin
Member 20271058-Jul-05 19:37
MemberMember 20271058-Jul-05 19:37 
GeneralRe: causes explorer crash on Win2k Pin
bosfan14-Jul-05 4:31
Memberbosfan14-Jul-05 4:31 
GeneralRe: causes explorer crash on Win2k Pin
Zakuska14-Jul-05 10:58
MemberZakuska14-Jul-05 10:58 
GeneralRe: causes explorer crash on Win2k Pin
rusty_rebar22-Aug-06 8:26
Memberrusty_rebar22-Aug-06 8:26 
GeneralRe: causes explorer crash on Win2k Pin
x33x12-Jan-07 9:55
Memberx33x12-Jan-07 9:55 
General/CTRL+M/ Annoyance Pin
Zakuska5-Jul-05 8:50
MemberZakuska5-Jul-05 8:50 
GeneralRe: /CTRL+M/ Annoyance Pin
bosfan14-Jul-05 4:27
Memberbosfan14-Jul-05 4:27 
GeneralRe: /CTRL+M/ Annoyance Pin
Zakuska14-Jul-05 10:51
MemberZakuska14-Jul-05 10:51 
GeneralRe: /CTRL+M/ Annoyance Pin
bosfan14-Jul-05 22:03
Memberbosfan14-Jul-05 22:03 
GeneralCommand Prompt Explorer Bar Pin
bosfan24-Jun-05 10:42
Memberbosfan24-Jun-05 10:42 
Questionwhere do you download it to? Pin
tdude5114-Apr-05 1:34
Membertdude5114-Apr-05 1:34 
Generalproject 8825 Pin
project 882524-Mar-05 3:03
sussproject 882524-Mar-05 3:03 
GeneralCrashing on WinXP sp1 Pin
Number818-Mar-05 14:38
MemberNumber818-Mar-05 14:38 

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.