Modify this key:
  Path: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro  l\Session Manager\Environment] 
key: windr
first delete this key that already exists (if it's typ is: 
REG_SZ if not you have a more serious explorer issue), then in it's place create a new key of typ:
Expandable String by right clicking in the right pane.
it's type will be: 
REG_EXPAND_SZ name it 
windir as it was before, and make the data 
%SystemRoot%. 
This should solve the problem, i have added the script for the same process below, but i have not had any success with it. The keys in certain folders are not easily changed by script.  
 Code:
 REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]
"windir"=REG_EXPAND_SZ:%SystemRoot%
 NOTE: the type of the key is usually what is changed... somehow by Windows, from an expand key to a normal 
REG_SZ.  This simply corrects this mistake. 
Questions/Comments: 
[email protected]
-William. § (marvin_gohan)