We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

%SystemRoot% variable changed

rshooper76
rshooper76 asked
on
Medium Priority
861 Views
Last Modified: 2008-02-01
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?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2006
Commented:
Hi rshooper76,

your drives are mirrored. this means that anything you delete from the c: drive, is mirrored so that its deleted off the mirror drive also, you cant change the system variable to point to an invisible drive as windows only see's a set of mirrored drives as one...

Cheers!

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
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.
CERTIFIED EXPERT
Top Expert 2006

Commented:
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?

Author

Commented:
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.
CERTIFIED EXPERT
Top Expert 2006

Commented:
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

Author

Commented:
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.
CERTIFIED EXPERT
Top Expert 2006

Commented:
you actually have a system root variable there under the environment variables????

Author

Commented:
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.
CERTIFIED EXPERT
Top Expert 2006

Commented:
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...

Author

Commented:
I was able to get this restored by removing the extra drive.
CERTIFIED EXPERT
Top Expert 2006

Commented:
well done, thanks for the points, dont know if i helped though....
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.