Renaming %WINDIR%?

C

Charles Lavin

Hi --

Is there a way to rename the %WINDIR% folder without destroying the machine?

I have a Windows XP Pro PC with an iffy installation history. This PC may
have had another operating system concurrently at one time. But now Windows
XP is the sole OS, and it's installed in C:\XP_OS ...

Thanks
CL
 
P

Pegasus \(MVP\)

Charles Lavin said:
Hi --

Is there a way to rename the %WINDIR% folder without destroying the
machine?

I have a Windows XP Pro PC with an iffy installation history. This PC may
have had another operating system concurrently at one time. But now
Windows XP is the sole OS, and it's installed in C:\XP_OS ...

Thanks
CL

What do you actually hope to gain by doing this?

If this was my machine and if I was convinced that I had to rename this
folder then I would try this method:
1. Boot the machine with a Bart PE boot CD.
2. Create a backup copy of all registry files.
3. Rename c:\XP_OS to its new name.
4. Modify boot.ini to reflect the change.
5. Boot the machine normally.
6. If things go wrong, reverse the above steps.
Note that there is no point in changing %WinDir%. It takes its value from
%SystemRoot%, which probably takes its value from boot.ini.
 
L

Lem

Pegasus said:
What do you actually hope to gain by doing this?

If this was my machine and if I was convinced that I had to rename this
folder then I would try this method:
1. Boot the machine with a Bart PE boot CD.
2. Create a backup copy of all registry files.
3. Rename c:\XP_OS to its new name.
4. Modify boot.ini to reflect the change.
5. Boot the machine normally.
6. If things go wrong, reverse the above steps.
Note that there is no point in changing %WinDir%. It takes its value from
%SystemRoot%, which probably takes its value from boot.ini.

This doesn't seem likely to work. Not all registry values use
environment variables like %windir%. Some specify paths and/or file
names explicitly. If you change the name of the directory where the OS
is located, all of the registry values that explicitly reference
C:\Windows (or C:\WinNT) will be incorrect.

--
Lem -- MS-MVP

To the moon and back with 2K words of RAM and 36K words of ROM.
http://en.wikipedia.org/wiki/Apollo_Guidance_Computer
http://history.nasa.gov/afj/compessay.htm
 
P

Pegasus \(MVP\)

Lem said:
This doesn't seem likely to work. Not all registry values use environment
variables like %windir%. Some specify paths and/or file names explicitly.
If you change the name of the directory where the OS is located, all of
the registry values that explicitly reference C:\Windows (or C:\WinNT)
will be incorrect.

You're right, of course. I actually checked the registry before I posted but
found out subsequently that my "search" parameters were totally wrong.
 
B

Bill Sharpe

Charles said:
Hi --

Is there a way to rename the %WINDIR% folder without destroying the machine?

I have a Windows XP Pro PC with an iffy installation history. This PC may
have had another operating system concurrently at one time. But now Windows
XP is the sole OS, and it's installed in C:\XP_OS ...

Thanks
CL
You have two choices:
If it ain't broke, leave it alone.
If it ain't broke, break it.

But first, you have to determine whether you think the system is broken.
Do you think the machine is not working properly with the unusual
installation directory?
 
B

BrianB

Bill Sharpe said:
You have two choices:
If it ain't broke, leave it alone.
If it ain't broke, break it.

But first, you have to determine whether you think the system is broken.
Do you think the machine is not working properly with the unusual
installation directory?

Personally, if you are determined to "fix" your PC, I'd recommend that you
find all the installation disks and downloads, backup your PC completely,
and start from scratch doing a full reinstallation of Windows and everything
else.

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top