Link to home
Start Free TrialLog in
Avatar of rshooper76
rshooper76

asked on

%SystemRoot% variable changed

I've been having some wierd problems on a Windows Server 2003 machine.  After looking into the problems I think know whats going on, I just don't know how to correct it.  The machine has 2 drives in a mirror(C:), this is where the OS is installed and the data is stored.  There is a 3rd drive(e:) that is used for temp fiels, backups, etc.  I notived a whiel back that the contents of the c: drive got copied over to the e: drive, waht is didn;t realize until laster was that the %systemroot% variable got moved from the c: to the e: drive as well.  All the applications still run off of the c: drive, the "Program files" folder was deleted off of e: tofrre up some space, so there is no question as to where these are running from.  The Docuements and Setting got moved from c: to e: as well, this is what caused the problesm to be notices, since a few things changed at the time.  The are many things that still point to locations on c:\Windows as well.  I want to get the sytsem to use the mirrored drive for everything, sicne its in a mirror, and it the drive thats getting backed up.  How can I do this?
ASKER CERTIFIED SOLUTION
Avatar of Jay_Jay70
Jay_Jay70
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rshooper76
rshooper76

ASKER

The C: and E; drives are not mirrored.  The system was installed with 2 mirroed drives, the C: drive.  An additioal drive was later added to stop soem telp files, backup files, etc.  The drive is the e: drive.  When this drive got added the data from the c: drive got copied over, kinda oa a quick immediate backup.  About a week ago it appears the %SystemRoot% vairable got moved from the c:\Windows to the e:\Windows folder.  Since the E: drive is not mirrored and it about 3 months older than the c: drive folder I want to move this back to the c: drive.
this isnt supposed to be possible... if you install windows to the c: you shouldnt be able to chage that variable

if you type %systemroot% into run line, what path does it bring up?
I know it isn't supposed to be possible, thats what i'm at a loss on how to fix it.  When I type %systemroot% it says "e:\windows", the hkey_local_machine\software\microsfot\windows nt\current version\winlogon\userinit value points to the c: drive.  I am thinking oc just booting in recover mode and running the "systemroot" commmand to change the system root directory.  I know it works on Windows XP, just not sure about Windows Server 2003, and i'm not sure what else may get messed up.
hmm the %windir% variable may tie into this

under my computer - properties - advanced - environment variables - you can check the windir variable and see what it is set to
It shows%SystemRoot% when I go into edit, e:\Windows when you just view it.  Keep in mind that the E: drive was not in the machine with the OS was installed.
you actually have a system root variable there under the environment variables????
No, I was looking at the windir environment variable.  There is not a System Root variable there. When you view the variable it show the value(E:\windows), but when you edit it it shows %systemroot%.  My laptop does the same thing, so do the other servers that I manage.
hmm been looking around and the only way that the variable can be changed is with a windows install - maybe run a repair install on the drive to bring the variable back

it is "supposed" to be undeditable! i spoke to a couple of scripters and they had no idea...
I was able to get this restored by removing the extra drive.
well done, thanks for the points, dont know if i helped though....