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. Advertisements

  2. Max Smart

    M Mullen 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")

    <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
     
    M Mullen, Dec 24, 2003
    #2
    1. Advertisements

  3. Max Smart

    Harrison Guest

    Harrison, Dec 24, 2003
    #3
  4. Max Smart

    Ben Guest

    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

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

    [ Doc Jeff ] Guest

    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.
     
    [ Doc Jeff ], Dec 25, 2003
    #6
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.