setting the default path

A

ALev

I figured out how to set the PATH for a single session with the Windows XP
Command Prompt shell, but how do I set the default path, so that I don't have
to set the PATH every time I open a new Command Prompt instance?

Thanks.
Andrew
 
J

John Wunderlich

I figured out how to set the PATH for a single session with the
Windows XP Command Prompt shell, but how do I set the default
path, so that I don't have to set the PATH every time I open a new
Command Prompt instance?

Right-Click "My Computer" -> Properties -> Advanced (Tab) ->
"Environment Variables"
In the "System Variables" window, scroll down,
find "Path", and double-click on it.
Edit away.

(I find it more helpful to copy it out of the small window, paste it
into Notepad, edit it there, copy it out of Notepad, then paste it back
in that [small] window.

HTH,
John
 
J

John John - MVP

I'm not sure what you mean. The path can be permanently set via the GUI
tool (System Properties | Advanced | Environment Variables).

If you want to set a special path for the Command Console only then you
can do it via the registry settings for the console.

HKEY_CURRENT_USER\Software\Microsoft\Command Processor

Value Name: Autorun
Type: REG_SZ or REG_EXPAND_SZ

Value can be whatever you want to be done automatically when the Command
Prompt starts, for example this could be a valid path command:

PATH=c:\temp

To always start the Command Console in the root folder:

cd\

The changes can be made system-wide (for all users) at the same location
in the HKLM subtree.

John
 
A

ALev

What I meant is the following. I have a program, say pgm53.exe, and I wanted
to be able to open a Command Console, and type pgm53.exe, and have it find
pgm53.exe.

I did it the first way you suggested and that worked.

Thank you.
 
J

John John - MVP

You're welcome.

John
What I meant is the following. I have a program, say pgm53.exe, and I wanted
to be able to open a Command Console, and type pgm53.exe, and have it find
pgm53.exe.

I did it the first way you suggested and that worked.

Thank you.
 

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