Lost path in Command Interpreter

B

Basiltoo

I have lost my PATH in the Command Interpreter. This is what I get
when typing PATH in a DOS window:

Path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

echo %systemroot% gives C:\windows

What has happened please and why has the Path not been correctly set as it
was until recently.

TIA
 
F

Frank Saunders, MS-MVP OE

Basiltoo said:
I have lost my PATH in the Command Interpreter. This is what I get
when typing PATH in a DOS window:

Path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

echo %systemroot% gives C:\windows

What has happened please and why has the Path not been correctly set
as it was until recently.

TIA

Well, since both command.com and cmd.exe are by default located in
%SystemRoot%\System32 there is nothing at all wrong with your Path. Want to
rephrase the question?

--
Frank Saunders, MS-MVP OE
Please respond in Newsgroup. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com/security/protect/
 
G

Guest

Don't understand question?
Is there something wrong with your "path"?
Is your "path" line causing a problem?
 
N

Nightowl

Don't understand question?
Is there something wrong with your "path"?
Is your "path" line causing a problem?

His path is not being correctly expanded -- he should see
C:\Windows\System32 in the Command window, not %SystemRoot%.

Basiltoo, can you run commands such as ipconfig correctly, or do you get
an error message? If you do, open Regedit and navigate to:

{HKEY_LOCAL MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]
and look at the Path entry. It should be of type REG_EXPAND_SZ, *not*
REG_SZ. You may need to reboot after making changes.

Hope this helps.
 
B

Basiltoo

Nightowl said:
His path is not being correctly expanded -- he should see
C:\Windows\System32 in the Command window, not %SystemRoot%.
{HKEY_LOCAL MACHINE\System\CurrentControlSet\Control\Session
Manager\Environment] and look at the Path entry. It should be of type
REG_EXPAND_SZ, *not* REG_SZ. You may need to reboot after making
changes.

Hope this helps.

It certainly does. Thank you very much Nightowl for understanding my
problem and providing the solution.

Thanks to all for responding
 
N

Nightowl

Basiltoo said:
It certainly does. Thank you very much Nightowl for understanding my
problem and providing the solution.

Thanks to all for responding

You're welcome, Baz, glad you got it fixed :)
 
G

Guest

How do you change the PATH from REG_SZ to REG_EXPAND_SZ? When I look at
this, all I have, is the option to modify the actual path.
 
W

Wesley Vogel

See if this helps...

[[To check your registry setting manually, run regedit and navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment. Examine the registry data type of the Path entry. If it
is not REG_EXPAND_SZ, then you need to perform the following steps:

1 Open the Path entry so that it is an editable string.
2 Select the entire string, and press Ctrl+C to copy it to the clipboard.
3 Cancel editing of the Path entry.
4 Open notepad and paste the string, to make sure it copied to the clipboard
correctly.
5 Delete the Path entry.
6 Create a new value called Path and make sure that you select REG_EXPAND_SZ
as the data type.
7 For the contents, press Ctrl+V to paste the contents of the clipboard.
8 Click OK to save the contents of the registry value.

The cause of this problem is probably an installation program that doesn't
correctly read and re-write the registry value with the correct data type.]]
from...
6. Why don't my commands work?
http://internet.cybermesa.com/~bstewart/cmdprompt.html#6

--
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