Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Working dir when using windows cmd prompt

  • 14-11-2005 10:27pm
    #1
    Registered Users, Registered Users 2 Posts: 175 ✭✭


    Hi,

    Looking for a bit of a tip on this question, Im sure it's an obvious one for all the windows heads.

    When I want to start up a dos box, I usually just run "cmd" from the address bar rather then clicking thru the start menu to the dos prompt icon.

    When I do this, the starting directory is always the same program file directory, but never the more normal c:\documents and settings\$USER$ ...

    Can anyone give me any idea how I can change this default? Cheers!


Comments

  • Registered Users, Registered Users 2 Posts: 2,942 ✭✭✭Mac daddy


    http://windowsxp.mvps.org/autoruncmd.htm
    Have a look there should answer your questions get back to me if it doesn't :)


  • Registered Users, Registered Users 2 Posts: 2,942 ✭✭✭Mac daddy


    or if your to lazy ;)
    call cmd.exe /k cd "%1"\
    

    start/run/ notepad - save as "name.cmd" save to desktop and double click it :)

    Replace the "Name" with what ever you want.


  • Registered Users, Registered Users 2 Posts: 175 ✭✭otron


    Thanks Mac Daddy, that did the trick.

    Now if I could only understand where it got this default directory from ... :confused::)


  • Registered Users, Registered Users 2 Posts: 1,202 ✭✭✭art


    otron wrote:
    Thanks Mac Daddy, that did the trick.

    Now if I could only understand where it got this default directory from ... :confused::)

    If you go to your Windows\system32 folder you can see the original "CMD.exe" executable. Right-click on it and choose create shortcut. Drag this shortcut (or copy and paste) to wherever is convenient either quick launch toolbar or desktop etc.

    Right-click your new shortcut and select properties. See where it says "Start in"? This is your default folder it points to on startup. Change the entry there to whatever you like and you'll have your command window set up the way you want it. (note - this only works with a short-cut, not with the original executable!!)


  • Registered Users, Registered Users 2 Posts: 1,724 ✭✭✭jaqian


    Mac daddy wrote:
    or if your to lazy ;)
    call cmd.exe /k cd "%1"\
    

    start/run/ notepad - save as "name.cmd" save to desktop and double click it :)

    Replace the "Name" with what ever you want.

    Thats deadly. Have to remember that.


  • Advertisement
  • Closed Accounts Posts: 16,713 ✭✭✭✭jor el


    I use this. Lets you right click any folder in explorer and open a command prompt there. Handy when you want a fairly heavily nested directory.

    It's just a simple registry entry:
    REGEDIT4
    
    [HKEY_CLASSES_ROOT\*\shell\cmdhere]
    @="Cmd&Here"
    
    [HKEY_CLASSES_ROOT\*\shell\cmdhere\command]
    @="cmd.exe /c start cmd.exe /k pushd \"%L\\..\""
    
    [HKEY_CLASSES_ROOT\Folder\shell\cmdhere]
    @="Cmd&Here"
    
    [HKEY_CLASSES_ROOT\Folder\shell\cmdhere\command]
    @="cmd.exe /c start cmd.exe /k pushd \"%L\""
    


  • Closed Accounts Posts: 1,525 ✭✭✭vorbis


    Thats fairly handy jor el. Thanks!


Advertisement