How to restore the path?

  • Thread starter Thread starter LurfysMa
  • Start date Start date
L

LurfysMa

From a DOS box, I typed "path /p" when I meant to type "path" to query
the path. Now the path is set to "/p".

Is there any way for me to restore the path to what it was before I
clobbered it? (sigh)

--
 
From a DOS box, I typed "path /p" when I meant to type "path" to query
the path. Now the path is set to "/p".

Is there any way for me to restore the path to what it was before I
clobbered it? (sigh)

PS: I have recent full system backups. Is there a file I can restore
or look at where the path is stored?

--
 
In
LurfysMa said:
From a DOS box, I typed "path /p" when I meant to type "path"
to query
the path. Now the path is set to "/p".

Is there any way for me to restore the path to what it was
before I
clobbered it? (sigh)

The command you entered should have changed the path only for
that session. To check on this, do the following;

Close any open command prompt windows. Open a new command
prompt window. Type path. Is it still set to /p?

If so, download and run fixpath2 from this web site.

fixpath2.zip
http://internet.cybermesa.com/~bstewart/misctools.html

For more info, take a look here.

Why don't my commands work?
http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

Good luck

Nepatsfan
 
In

The command you entered should have changed the path only for
that session. To check on this, do the following;

Close any open command prompt windows. Open a new command
prompt window. Type path. Is it still set to /p?

Whew. Thank you. You are correct. Closing the command box and
reopening it shows the original path.

While I was waiting for an answer here, I did some more research and
discovered the "environment variables" section in the System applet. A
couple of questions:

1. If I had changed it there, would it have been changed permanently?

2. The path there looks different. It seems to contain "variables"
that are resolved when I enter the Path command in the DOS box. In the
system applet, the path is:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

In the command box, it's:

C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;



--
 
In
LurfysMa said:
Whew. Thank you. You are correct. Closing the command box and
reopening it shows the original path.

While I was waiting for an answer here, I did some more
research and
discovered the "environment variables" section in the System
applet. A
couple of questions:

1. If I had changed it there, would it have been changed
permanently?

2. The path there looks different. It seems to contain
"variables"
that are resolved when I enter the Path command in the DOS
box. In the
system applet, the path is:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

In the command box, it's:

C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;

1. The simple answer to your question is yes. If you make a
change there, it will be recorded in this registry key.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment

For that reason, it's usually a good idea to back up that
registry key before you make any changes to your computer's
environmental variables.

2. As long as the above registry key's type is REG_EXPAND_SZ,
it will resolve variables such as %SystemRoot% to the
appropriate location.

Nepatsfan
 
Back
Top