7
3
Some time ago I manually changed the WINDIR
environment variable to test something in a legacy program I was working with (should have done this on a VM rather than my desktop :/ but it's too late now)
So for some reason now %WINDIR%
does not resolve to c:\windows anymore, but to %SystemRoot%. From the command line:
echo %WINDIR% outputs %SystemRoot%
and
echo %SystemRoot% outputs C:\windows
Not being able to resolve WINDIR is causing me all sorts of head aches. I've tried setting the value of WINDIR
explicitly to c:\windows
in that console windows provides, but to no avail. I've also tried manually changing the windir registry key's value at
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\windier
and
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\Environment\windir
But still not luck. Has anyone seen this behavior before?
forgot to mention this is on windows 7 Enterprise ed
Don't know what windows version you use or about other windows versions but in XP it's HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and HKCU\Environment – barlop – 2012-09-19T11:06:15.967
suppose you do for example C:>reg query HKCU\Environment <ENTER> or rather C:>reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment <ENTER> Then does it show the environment variable has been changed at that registry location? – barlop – 2012-09-19T11:08:09.087
1and for me, (xp), %windir% gives c:\windows and %systemroot% gives c:\windows – barlop – 2012-09-19T11:09:49.097
I would just reinstall your operating system. Of course I don't see the problem, %WINDIR% is suppose to point to the Windows directory is it not? Both variables are suppose to point to
C:\Windows
– Ramhound – 2012-09-19T11:29:15.9771You changed the value to C:\windows and it did not solve your problems? Maybe this is not what causes your problems then? – Langhard – 2012-09-19T11:38:58.657
%systemroot%
and%windir%
resolve to the same destination to C:\Windows on Windows-7 too. – avirk – 2012-09-19T11:40:28.643echo %windir%
does output C:\windows on my machine, not %SystemRoot% – Langhard – 2012-09-19T12:01:10.743