Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Command Prompt Explorer Bar - The Code Project - C# Programming
[go: Go Back, main page]

4,487,617 members and growing!   18,806 now online.
Email Password Password problem?
All Topics, C#, .NET >> C# Programming >> PInvoke

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#, C++ (VC7)
Windows (WinXP, Win2K), .NET (.NET 1.0)
Win32, VS (VS.NET2002)
Dev
Posted: 31 May 2002
Updated: 11 Jun 2002
Views: 633,034
Announcements


Search    
Advanced Search
Sitemap
PrintBroken Article?Bookmark Discuss Send to a friend
237 votes for this article.
Popularity: 11.13. Rating: 4.69 out of 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.

Pavel Zolnikov


Click here to view Pavel Zolnikov's online profile.


Other popular C# Programming articles:

[Top] Sign in to vote for this article:     PoorExcellent  
Note: You must Sign in to post to this message board.
Hint: For a faster board use IE 4+ or Mozilla, choose 'Message View' from the View dropdown and hit 'Set Options'.
FAQ Message score threshold    Search comments  
 View   Per page  
 Msgs 1 to 25 of 238 (Total: 238) (Refresh)[First] [Prev] [Next] [    ]
Subject 
Author 
Date 
  How to display Explorer Bar
 vikrant kpr 16:50 7 Sep '07 
  Need drag and drop
 sinbao 1:05 19 Jul '07 
  Causes WinMerge to fail.
 UKCodeMonkey 5:25 17 Jul '07 
  Best Power toy ever!
 kerneljag 0:38 24 Jan '07 
  PowerShell Support
 irishjd 11:05 13 Dec '06 
  Multiple explorer windows with command prompt?
 NathanPalmer 13:09 30 Nov '06 
  visual 2005
 hezyz 17:30 13 Nov '06 
  The best
 Zabersoft-ahj 20:48 10 Aug '06 
  Bugs [modified]
 The_Mega_ZZTer 15:42 2 Aug '06 
  WinXP, VisStudio 2005 -- no joy
 Number8 18:48 1 Jul '06 
  Re: WinXP, VisStudio 2005 -- no joy
 The_Mega_ZZTer 18:52 2 Aug '06 
  Alternative tool
 mustsee 19:56 20 Apr '06 
  Focus Hotkey please!
 duffman071 18:38 17 Apr '06 
  Damn!
 Bassam Abdul-Baki 23:10 3 Mar '06 
  Isolate the Prompt Control
 Bruno R. Figueiredo 13:11 1 Feb '06 
  Re: Isolate the Prompt Control
 The_Mega_ZZTer 18:44 2 Aug '06 
  Nify piece of software
 JQLD 11:53 20 Nov '05 
  How to debug this?
 Vijay Chandra Sekhar Parepalli 14:51 20 Oct '05 
  Re: How to debug this?
 sxwsws 12:36 16 Nov '05 
  the best power tool i have found
Unconfirmed/Anonymous posting Anonymous 12:15 4 Oct '05 
  make the prompt do other stuff
Unconfirmed/Anonymous posting Anonymous 18:53 1 Oct '05 
  MessageBox kills toolbar buttons
 wimix 13:32 1 Oct '05 
  causes explorer crash on Win2k
 hensh 0:37 9 Jul '05 
  Re: causes explorer crash on Win2k
 mirso67 9:31 14 Jul '05 
  Re: causes explorer crash on Win2k
 Zakuska 15:58 14 Jul '05 
Last Visit: 9:31 Tuesday 11th September, 2007[First] [Prev] [Next] [    ]

General comment    News / Info    Question    Answer    Joke / Game    Admin message


Updated: 11 Jun 2002 Article content copyright Pavel Zolnikov, 2002
everything else Copyright © CodeProject, 1999-2007.
Web13 | Advertise on The Code Project | Privacy

The Ultimate ToolboxASP AllianceDeveloper FusionDevelopersdexDevGuruProgrammers HeavenPlanet Source CodeTek-Tips Forums