SystemRoot env var cripples system

ExplodingBoy

Senior member
Feb 9, 2000
415
0
0
On a windows 2000 system I set an env var "SystemRoot=c:\winnt" via the control panel. (I was trying to fix a path problem.) Anyway... After doing so, the system was not bootable. You get a Session Manager failure right before the GUI login prompt would come up. Some research uncovered that this particular error normally happens when permissions to the systemroot are messed up. The problem was fixed by booting the pc via an ERD and manually editing the registry key for the env var.

Why in the HECK does setting this env var muck up Win2K so badly? And why does the system let you do this? Sheesh.

In case someone is wondering, if you DO manange to muck up you system in this fashion, not even running the auto-repair or in-place install of win2k will fix the problem.

 

geoff2k

Golden Member
Sep 2, 2000
1,929
0
76
Open up regedit and go to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet

Do a find for %systemroot% and get acquainted with all the services, event log message resources, device drivers and other critters that depend on that environment variable. :)

I'm not sure if MS does it that way so that you can move an NT installation from drive to drive (unlikely), or so that they can speed up setup by writing paths in the registry in terms of variables, and only expanding them at access time... anybody know?
 

ExplodingBoy

Senior member
Feb 9, 2000
415
0
0
Well yeah I know the path to systemroot is pretty critical and %systemroot% is all over the place in the registry. What I don't figger is why setting it as an env var should mess things up. After all, I set systemroot to the correct setting, c:\winnt