Command prompt - change default?

P

Pete L

I'm sure it's simple but I have had a real good look through web sites
to find the answer before I try this route......

When I open a command prompt window the line defaults to directory
"\Documents and Settings\Peter" I don't want this directory and I would
like it to default to a directory called \MinGW whenever I open a
command prompt window so I can run some C++ programs.

How do I do this please??
 
W

Wesley Vogel

If \MinGW is valid.

Try this...

Right click the Desktop | New | Shortcut |
Paste this in the location box:

%SystemRoot%\system32\cmd.exe

Click Next | Click Finish |

Right click the new cmd.exe shortcut | Properties |
In the Start in box replace %windir% with \MinGW |
Click Apply | Click OK

You can also change the Start in for the cmd shortcut located under
Accessories on the Start Menu.

Right click the cmd shortcut | Properties | Type: \MinGW in the Start in
box

HOW TO: Set the Command Processor Appearance in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;309019

Set the Command prompt default path to a certain directory
http://windowsxp.mvps.org/autoruncmd.htm


--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
O

Osiris

I'm sure it's simple but I have had a real good look through web sites
to find the answer before I try this route......

When I open a command prompt window the line defaults to directory
"\Documents and Settings\Peter" I don't want this directory and I would
like it to default to a directory called \MinGW whenever I open a
command prompt window so I can run some C++ programs.

How do I do this please??

When I set the autorun (newly created by me) to

CD /D C:\WINDOWS

the Command prompt show correctly is C:\WINDOWS>

However, it is preceded by the error message

The system cannot find the path specified.

Typing in the command CD /D C:\windows in the CMD window afterwards
works correctly...

Why the error message ?
 
O

Osiris

When I set the autorun (newly created by me) to

CD /D C:\WINDOWS

the Command prompt show correctly is C:\WINDOWS>

However, it is preceded by the error message

The system cannot find the path specified.

Typing in the command CD /D C:\windows in the CMD window afterwards
works correctly...

Why the error message ?


OOPS: visual studio replaced the standard properties of the cmd
link....
 
W

Wesley Vogel

CD C:\windows

No need for the /d switch unless you need to change current drive also.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
W

Wesley Vogel

Keep having fun, Pete. ;-)

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top