Command Prompt

Discussion in 'Computer Support' started by Max Smart, Dec 24, 2003.

  1. Max Smart

    Max Smart Guest

    I hate navigating through directories at a command prompt and I
    found a neat vbscript that runs under WIN XP and WIN 2000 that adds
    a command prompt option to the Windows Explorer context menu. Use it
    at your own risk...

    Set objShell = CreateObject("WScript.Shell")

    objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
    "cmd.exe /k cd " & chr(34) & "%1" & chr(34)
    objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt
    Here"

    Save it with a .vbs file extension and run it from a command prompt
    like this...

    cscript yourscript.vbs

    Right click any folder to in Windows Explorer to get a command
    prompt to open at that location. Pretty cool, eh? Sorry, I'm easily
    excitable.

    Max
    Max Smart, Dec 24, 2003
    #1
    1. Advertising

  2. Max Smart

    M Mullen Guest

    On Wed, 24 Dec 2003 20:26:45 GMT, "Max Smart" <>
    wrote:

    |> I hate navigating through directories at a command prompt and I
    |> found a neat vbscript that runs under WIN XP and WIN 2000 that adds
    |> a command prompt option to the Windows Explorer context menu. Use it
    |> at your own risk...
    |>
    |> Set objShell = CreateObject("WScript.Shell")

    <snipped alot more>

    As a general rule there are at least three ways to do anything in windows.
    Here's number two of a command prompt on demand.

    To put a command that opens a Command Prompt window on right-click menus in
    Windows Explorer or My Computer, you just need to make a Registry change. Open a
    Registry editor, and go to the HKEY_CLASSES_ROOT\Directoryshell key. Create a
    new subkey named OpenNew. Open the Default item in the right pane, and make its
    value Open A Command Window. (This Registry value represents the phrase that
    appears on the shortcut menu, so you can substitute a phrase of your own.)
    Create a new subkey named Command in your new OpenNew subkey. Open the Default
    item and enter

    cmd.exe /k cd %1

    as the value. (You're only changing the value of the Default item; you're not
    adding a new data item to the subkey.)

    If you have multiple drives on your computer, you can add a similar command for
    the shortcut menu that appears when you right-click a drive object in Windows
    Explorer or My Computer. The instructions are the same as those for creating the
    command for folders, except that you use the HKEY_CLASSES_ROOT\Drive\shell key
    as the starting point. Also, the value of the Default item in the
    HKEY_CLASSES_ROOT\Drive\shell\OpenNew\Command key is cmd.exe /k.

    Reference: http://www.winnetmag.com/Articles/ArticleID/15733/pg/2/2.html
    --
    ,,
    ( "> w
    ,(> )>| Despite the high cost of living, it remains popular.
    ( ^^ '
    M Mullen, Dec 24, 2003
    #2
    1. Advertising

  3. Max Smart

    Harrison Guest

    MS makes a powertoy for this very thing.
    it's called Command Line Here.
    http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp

    On Wed, 24 Dec 2003 20:26:45 GMT, "Max Smart"
    <> wrote:

    >I hate navigating through directories at a command prompt and I
    >found a neat vbscript that runs under WIN XP and WIN 2000 that adds
    >a command prompt option to the Windows Explorer context menu. Use it
    >at your own risk...
    >
    >Set objShell = CreateObject("WScript.Shell")
    >
    >objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
    > "cmd.exe /k cd " & chr(34) & "%1" & chr(34)
    >objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt
    >Here"
    >
    >Save it with a .vbs file extension and run it from a command prompt
    >like this...
    >
    >cscript yourscript.vbs
    >
    >Right click any folder to in Windows Explorer to get a command
    >prompt to open at that location. Pretty cool, eh? Sorry, I'm easily
    >excitable.
    >
    >Max
    >
    Harrison, Dec 24, 2003
    #3
  4. Max Smart

    Ben Guest

    On 12/24/03 2:26 PM, Max Smart wrote:

    > I hate navigating through directories at a command prompt and I
    > found a neat vbscript that runs under WIN XP and WIN 2000 that adds
    > a command prompt option to the Windows Explorer context menu. Use it
    > at your own risk...
    >
    > Set objShell = CreateObject("WScript.Shell")
    >
    > objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
    > "cmd.exe /k cd " & chr(34) & "%1" & chr(34)
    > objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt
    > Here"
    >
    > Save it with a .vbs file extension and run it from a command prompt
    > like this...
    >
    > cscript yourscript.vbs
    >
    > Right click any folder to in Windows Explorer to get a command
    > prompt to open at that location. Pretty cool, eh? Sorry, I'm easily
    > excitable.
    >
    > Max
    >
    >

    Max,
    Then try this, you'll love it more.
    http://www.12ghosts.com/ghosts/shellx.htm
    Ben, Dec 24, 2003
    #4
  5. Max Smart

    Max Smart Guest

    Cool PowerToys. I found the script samples here...

    http://tinyurl.com/aqlo

    Max


    "Harrison" <> wrote in message
    news:...
    > MS makes a powertoy for this very thing.
    > it's called Command Line Here.
    > http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp
    >
    > On Wed, 24 Dec 2003 20:26:45 GMT, "Max Smart"
    > <> wrote:
    >
    > >I hate navigating through directories at a command prompt and I
    > >found a neat vbscript that runs under WIN XP and WIN 2000 that

    adds
    > >a command prompt option to the Windows Explorer context menu. Use

    it
    > >at your own risk...
    > >
    > >Set objShell = CreateObject("WScript.Shell")
    > >
    > >objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
    > > "cmd.exe /k cd " & chr(34) & "%1" & chr(34)
    > >objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt
    > >Here"
    > >
    > >Save it with a .vbs file extension and run it from a command

    prompt
    > >like this...
    > >
    > >cscript yourscript.vbs
    > >
    > >Right click any folder to in Windows Explorer to get a command
    > >prompt to open at that location. Pretty cool, eh? Sorry, I'm

    easily
    > >excitable.
    > >
    > >Max
    > >

    >
    Max Smart, Dec 24, 2003
    #5
  6. Max Smart

    [ Doc Jeff ] Guest

    On Wed, 24 Dec 2003 20:26:45 GMT, "Max Smart"
    <> wrote:

    >I hate navigating through directories at a command prompt and I
    >found a neat vbscript that runs under WIN XP and WIN 2000 that adds
    >a command prompt option to the Windows Explorer context menu. Use it
    >at your own risk...
    >
    >Set objShell = CreateObject("WScript.Shell")
    >
    >objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", _
    > "cmd.exe /k cd " & chr(34) & "%1" & chr(34)
    >objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt
    >Here"
    >
    >Save it with a .vbs file extension and run it from a command prompt
    >like this...
    >
    >cscript yourscript.vbs
    >
    >Right click any folder to in Windows Explorer to get a command
    >prompt to open at that location. Pretty cool, eh? Sorry, I'm easily
    >excitable.
    >
    >Max


    It's my opinion that if you have to go to that much effort to get to a
    subdirectory (no, I will NOT call it a folder), you really ought to go
    back to using MS BOB.

    --
    http://www.cotse.net - Use it, you know you want to.
    If you're too scared to go look for yourself, ask me
    about COTSE. I'd be happy to tell you about it.
    [ Doc Jeff ], Dec 25, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWNvc3Rl?=

    command prompt opens for a split second

    =?Utf-8?B?TWNvc3Rl?=, Aug 19, 2005, in forum: Wireless Networking
    Replies:
    5
    Views:
    4,860
    =?Utf-8?B?TWNvc3Rl?=
    Aug 21, 2005
  2. mick

    DOS command prompt

    mick, Jan 17, 2004, in forum: Microsoft Certification
    Replies:
    8
    Views:
    8,016
    Sandra
    Jan 28, 2004
  3. =?Utf-8?B?Umljaw==?=

    Command Prompt

    =?Utf-8?B?Umljaw==?=, Nov 1, 2004, in forum: Microsoft Certification
    Replies:
    1
    Views:
    590
    Coolfox
    Dec 20, 2004
  4. Kenny

    Command prompt window?

    Kenny, Aug 7, 2003, in forum: Computer Support
    Replies:
    3
    Views:
    2,003
    Kenny
    Aug 7, 2003
  5. calvin
    Replies:
    0
    Views:
    434
    calvin
    Mar 8, 2006
Loading...

Share This Page