Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: XP: Want to Change Default CMD prompt directory  (Read 7589 times)

0 Members and 1 Guest are viewing this topic.

u0f025

    Topic Starter


    Newbie

    XP: Want to Change Default CMD prompt directory
    « on: February 26, 2009, 09:16:43 AM »
    I understand that to change the directory that one is placed into upon Start>Run>cmd (which currently puts me into c:\Documents and Settings\userid), I have to edit the registry.  I am hesitant to do this.  Isn't there some variable that can be set or some way a batch file can be set to automatically execute upon executing the cmd command?  I know it seems lazy, but I have to do this a lot and would like this directory to be set to c:\ automatically (I have a .bat file that changes it after that, but doggone it why can't it start where I want it to?  : )

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: XP: Want to Change Default CMD prompt directory
    « Reply #1 on: February 26, 2009, 06:48:16 PM »
    Welcome to the CH forums.

    Would you consider using a shortcut to open the Cmd.exe window?  Using a shortcut you can do just about anything with the window which opens including color the screen,  open in full screen, default to any path you wish etc... or you could set Hotkeys (Shortcut keys) to start Cmd as shown...

    Attached a couple of screenshot examples.   The Target on the first one should show it starting with %comspec%

    [attachment deleted by admin]
    One good deed is worth more than a year of good intentions.

    GuruGary



      Adviser
      Re: XP: Want to Change Default CMD prompt directory
      « Reply #2 on: February 26, 2009, 09:11:00 PM »
      You could create a batch file with the command and put it in your path.  For example, use
      Code: [Select]
      cmd /k cd /d C:\and save it as CMD2.bat in your C:\Windows directory, or anywhere in your path.  Then you can do Start -> Run -> CMD2

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: XP: Want to Change Default CMD prompt directory
      « Reply #3 on: February 26, 2009, 10:34:05 PM »
      what about autoexec.nt?
      I was trying to dereference Null Pointers before it was cool.

      Dias de verano

      • Guest
      Re: XP: Want to Change Default CMD prompt directory
      « Reply #4 on: February 27, 2009, 12:22:23 AM »
      what about autoexec.nt?

      That's for 16 bit DOS applications & COMMAND.COM.

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: XP: Want to Change Default CMD prompt directory
      « Reply #5 on: February 27, 2009, 09:27:43 AM »
      what about autoexec.nt?

      That's for 16 bit DOS applications & COMMAND.COM.


      ok. haven't done a lot of batch stuff since 3.1 and 98, as you can probably tell  :-X
      I was trying to dereference Null Pointers before it was cool.