Click here to Skip to main content
6,822,613 members and growing! (16,251 online)
Email Password   helpLost your password?
Desktop Development » Shell and IE programming » General     Intermediate

Starting a DOS prompt from Windows Explorer

By Daniel Larocque

How to start a dos prompt by right-clicking on a folder in Windows Explorer
VC6Win2K, Visual-Studio, Dev
Posted:16 Nov 2000
Views:149,442
Bookmarked:32 times
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
65 votes for this article.
Popularity: 7.95 Rating: 4.39 out of 5
2 votes, 7.7%
1

2
1 vote, 3.8%
3
5 votes, 19.2%
4
18 votes, 69.2%
5

Introduction

Even if a lot of operations can be done directly from the Windows Explorer, it is still necessary, sometimes, to open a DOS prompt to perform a particular task. Typing the full path of a directory can be really annoying. Recently, I've learned a way of starting a DOS prompt with its current directory set to a particular folder The following steps will show you how to add an entry in the pop-up menu that appears when you right-click on a folder from the Windows Explorer. Selecting this entry will open a DOS prompt with its current directory set to the folder you just right-clicked.
  1. Open your registry (regedit)

  2. Go to the following key: HKEY_CLASSES_ROOT\Folder\shell
  3. Add this key: CmdPrompt and set its default value to: "Command Prompt"
  4. Under this new key, add the following key: Command and set its default value to: "c:\winnt\system32\cmd.exe"

You should now have this tree in your registry:

That's it. Now, whenever you will right-click on a folder, the pop-up menu will contain an entry called "Command Prompt".

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

Daniel Larocque


Member

Occupation: Web Developer
Location: Canada Canada

Other popular Shell and IE programming articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 43 (Total in Forum: 43) (Refresh)FirstPrevNext
GeneralOr paste cmd.bat into the directory... Pinmembercraig4wd23:05 27 Aug '08  
GeneralNOTE: change Path on XP to WINDOWS for command key Pinmembertedzzz7:19 14 Sep '06  
GeneralAllow UNC paths PinmemberJose Xavier7:04 4 Nov '04  
GeneralDOS or not? Pinmemberajvn70:41 25 Sep '04  
GeneralAn even easier way for XP Pinmembercoderitr4:28 22 Jun '03  
GeneralRe: An even easier way for XP Pinmembersaltynuts200221:03 9 Sep '03  
GeneralRe: An even easier way for XP PinsussAnonymous5:08 17 Dec '03  
GeneralRe: An even easier way for XP PinsussAnonymous10:38 22 Jun '04  
GeneralHow to delete/edit erroneous file folder type associations Pinmemberkpatel10816:11 29 Oct '04  
GeneralRe: An even easier way for XP Pinmembergabmurillo6:24 20 Jul '04  
GeneralRe: An even easier way for XP Pinmemberkpatel10819:23 20 Dec '04  
GeneralRe: An even easier way for XP Pinmemberlars@phobe.com22:49 17 Apr '05  
GeneralTry this Pinmembermgomez3:34 15 Jan '03  
GeneralWin XP problem PinmemberGerard Nicol16:01 22 May '02  
GeneralKeeping it simple is great, but taking it a bit further... PinmemberDaniel Madden21:55 28 Apr '02  
GeneralVery good! Man PinmemberAnonymous13:58 10 Apr '02  
GeneralHow to do this to a file? PinmemberNiklas7921:34 18 Feb '02  
GeneralRe: How to do this to a file? PinmemberAnonymous10:16 18 Apr '02  
GeneralSafest yet Easiest way Pinmembermakemani13:31 29 Jan '02  
GeneralRe: Safest yet Easiest way PinmemberAnonymous4:07 27 Mar '02  
GeneralRe: Safest yet Easiest way PinmemberAnonymous14:11 10 Apr '02  
GeneralRe: Safest yet Easiest way Pinmemberimuav15:24 3 May '07  
GeneralRe: Safest yet Easiest way PinmemberHogfather6:13 13 May '08  
GeneralThat's always been good.... Pinmembercero10:46 20 Dec '01  
GeneralSend-to in w2k PinmemberGennady Oster0:47 17 Dec '01  

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

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

PermaLink | Privacy | Terms of Use
Last Updated: 16 Nov 2000
Editor: Chris Maunder
Copyright 2000 by Daniel Larocque
Everything else Copyright © CodeProject, 1999-2010
Web18 | Advertise on the Code Project