%SystemRoot% Environment Variable NOT resolving in PATH BUT does resolve at console command line???

H

Hammer Toe

I keep getting the error message that it is not
recognized as an internal or external command, operable
program or batch file. Does anyone know how to fix this
or do I have to do a repair installation of XP?

'That's' VERY Interesting..... because for the first time EVER I've
started having very similar problems JUST TODAY trying to run ANY
External Commands from a Command PROMPT window..... (specifically
commands in C:\WINDOWS and C:\WINDOWS\SYSTEM32....)

Eg. open a 'Console' window and try to run IPCONFIG /ALL.

I always get a (not exact words here) 'command not found' message.....

NOW I know that the command does exist on my system and if I change to
the directory where it is (C:\Windows\System32) and run it, it
works...

So, what I then tried was to display the PATH (environment variable)
setting as it DISPLAYS at the command prompt and ah-ha!!!

Path displays as:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\ATI Technologies\ATI Control Panel;C:\Program Files\UltraEdit

Whereas it SHOULD display as:
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\ATI Technologies\ATI Control Panel;C:\Program Files\UltraEdit

Funny (I suppose) the %SystemRoot% Environment Variable is NOT 'being
resolved' in the path statement (at least insofar as it is being
diplayed in the Console Window) ***YET*** - IF you type %SystemRoot%
at the prompt and hit 'enter'; it DOES get resolved as "C:\WINDOWS" so
why THERE but not in the path....???

Now. the path sytax DOES look right (I can see now errors. If you go
into System Properties->Advanced->Environment Variables it 'displays
correctly' (resolves) even though if you try to EDIT the value you can
SEE %SystemRoot% there in the 'source' so it's resolving THERE but
NOT in the console window/'further down the food chain....

I managed to fixc/work around the problem by changing (editing) all
occurances of %SystemRoot% in the path, 'hardcoding it' with
C:\WINDOWS and everything now works but I still don't know WHY it
didn't/doesn't work here in the first place.

ALSO strange/for what it's worth: I have four (three OTHER) XP
computers in the house so I decided to chech them out for comparison
and 'interesting':

1. Some have 'hardcoded' C:\WINDOWS values in the path and others use
%SystemRoot% and YET they ***ALL WORK*** except this last one with the
most recent 'buildup' with XP on it.....

Any ideas???

In anay even, I suggest changing %SystemRoot% to C:\Windows in the
PATH may solve your problem.

I would be very interested in any feedback/suggestions.....
 

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