Default directory to run commands

P

Paul Ghattas

Normally, when I type cmd and and get a command prompt, I
could type in certain commands no matter what directory I
was in and it would run, such as ping. Now when I am
running in cmd.exe, I have change the folder to
c:\windows\system32 and then type ping for it to
recognize. I a m running windows XP Pro. Is there a way
I change the default directories to look in when I type a
command?

Thanx a bunch.
 
R

Ramesh [MS-MVP]

Hi Paul,

Open Regedit.exe and goto this location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment
Value = "Path" in right pane:

Enter:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;D:\Program
Files\Support Tools\;
This makes windows to search for the above-said folders, when you type a
command. Add as many folders as you want.

--
Regards,

Ramesh (MS-MVP)
(e-mail address removed)
http://www.mvps.org/sramesh2k

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com

~ Please reply to newsgroup ~


Normally, when I type cmd and and get a command prompt, I
could type in certain commands no matter what directory I
was in and it would run, such as ping. Now when I am
running in cmd.exe, I have change the folder to
c:\windows\system32 and then type ping for it to
recognize. I a m running windows XP Pro. Is there a way
I change the default directories to look in when I type a
command?

Thanx a bunch.
 
B

Black Baptist

Ramesh [MS-MVP] rambled on in microsoft.public.windowsxp.general:
D:\Program
Files\Support Tools\;

D:\Program
Files\Support Tools\;? should be C: shouldn't it?
 
A

Alex Nichol

Ramesh said:
Enter:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;D:\Program
Files\Support Tools\;
This makes windows to search for the above-said folders, when you type a
command. Add as many folders as you want.

You do not need to go to regedit.

Control Panel - System - Advanced, Click Environmental Variables, and
highlight and edit Path in that.

Be sure to add anything *after* the . . system32\WBEM item
 
R

Ramesh [MVP]

Already got that, Alex. Was supposed to reply to the thread; forgot it.

--
Ramesh - Microsoft MVP
http://www.mvps.org/sramesh2k

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com

~ Please reply to newsgroup ~


Ramesh said:
Enter:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;D:\Program
Files\Support Tools\;
This makes windows to search for the above-said folders, when you type a
command. Add as many folders as you want.

You do not need to go to regedit.

Control Panel - System - Advanced, Click Environmental Variables, and
highlight and edit Path in that.

Be sure to add anything *after* the . . system32\WBEM item
 

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