Jump to content

My Command Prompt is broken :(


Eldmannen

Recommended Posts

NEVERMIND THIS PROBLEM HAS BEEN SOLVED

Windows XP + SP2.

If I type the commands in C:\ it does not work.

C:\>net

'net' is not recognized as an internal or external command,

operable program or batch file.


C:\>ping

'ping' is not recognized as an internal or external command,

operable program or batch file.
This is my PATH environmental variable.
C:\>echo %PATH%

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
If I type the commands in C:\Windows\system32\ it works fine.
C:\WINDOWS\system32>net

The syntax of this command is:



NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |

	  HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |

	  SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]

Link to comment
Share on other sites

  • Administrator

I'm wondering why when you echo path it returns %SystemRoot%, whereas when I echo it on my system it returns the full path.

echo %path%

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

echo %systemroot%

C:\WINDOWS

Link to comment
Share on other sites

Oh, interesting.

Press WinKey+break/Pause, now in the dialog "System Properties" that appears select the "Advanced" tab, and click on the "Environmental Variables" button.

In the Window that comes up, select "Path" in the listbox in the "System Variables" frame, and click on the "Edit" button. Now a dialog entitled "Edit System Variable" comes up. Mine looks like this:

Variable name: Path

Variable value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

Link to comment
Share on other sites

Try replacing SystemRoot with C:\WINDOWS\ or the path to your Windows install.

Yes, thats obviously crossed my mind, to edit my environment variables to manually insert the real path instead of use a variable.

Just wanted to see how your 'variable value' looks.

So please follow the directions on my previous post.

Link to comment
Share on other sites

When I click on the 'Edit' button it says;

Variable value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

but in the "System variable" frame, it says

...

Path | C:\WINDOWS\system32;C:\WINDOWS;...

...

C:\>path

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

Link to comment
Share on other sites

Good news, I have now solved this mystery!

http://local.google.com/answers/threadview?id=148427

I had to open the registry editor and changed the type on the key 'Path' from 'REG_SZ' to 'REG_EXPAND_SZ', because apparently somehow (some software I guess) must have changed the type of the key.

The key is in: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment

Link to comment
Share on other sites

  • Administrator

Try replacing SystemRoot with C:\WINDOWS\ or the path to your Windows install.

Yes, thats obviously crossed my mind, to edit my environment variables to manually insert the real path instead of use a variable.

Just wanted to see how your 'variable value' looks.

So please follow the directions on my previous post.

You may want to ask a bit more clearly next time. At any rate, glad to hear you got it fixed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...