Storing Windows profiles on a different partition.


Recommended Posts

This guide explains how to set up your computer so that all the profiles are stored on a separate partition. The tried and true way of doing this has always been to simply use a registry hack to move the profiles using a registry hack.

There are to problems with this method, the biggest of which is that some programs will use fixed paths to access files and folders that they require. My biggest example is SonicStage, it stores its database in the ?All Users? profile which normally can?t be moved. To top that off if you do move the profile with a registry hack SonicStage complains that the path ?C:\Documents and Settings\All Users\...? no longer exists.

Also if you have the rest of the profiles on a separate partition you will still loose the ?All Users? profile in the event of a system format, which is the second problem. This little trick avoids that problem and places all profiles on a separate partition.

Before you start this make sure you have the following things?

1. At least two accounts with administration privileges.

2. A full backup of all your data in cast something goes wrong.

3. Familiarity with editing the registry.

Further more I advise doing all of this in safe mode (not only so you can use the Administrator account but also so no service screw up what you are trying to do). It may work when using Windows normally but I never tested it.

Also note that I only tested this on Windows XP with Service Pack 2 installed. If should work on any Windows XP machine or even Windows 2000 machines but I am not sure. If you do test this on another version of Windows please post if it was successful or not. Finally I take no responsibility if you destroy your system while doing this. By doing this you are acknowledging that you are a way above average user and are willing to suffer the consequences if something goes wrong (I highly advise doing this on a test machine if one is available first). And once again BACK UP ALL YOU DATA (I know when people say this many users neglect to actually do it. Well don?t if something goes wrong you want a back up and there is a good chance of something going wrong)!

Also read this page all the way through before attempting this (also print off a copy before attempting it). If you don?t understand one of the steps please post and ask for clarification (I know I?m not the best at writing instructions). Don?t try to wing it as that is a very bad idea.

So without further delay, here are the steps required to store all the profiles on a separate partition while still making them appear to be located in the ?C:\DocumenStep 1gs? folder.

Step 1

First and foremost you need to copy all the user profile folders over to your new partition. The problem is when you try to copy the files in the profile you are using you will get an error that some required files are in use and therefore locked. So you are going to need two accounts in the Administrator group to pull this off. Log on as one of the Administrators and follow these steps?

1. Right-Click on your ?My Computer? icon and select ?Properties? from the menu.

2. Click on the ?Advanced? tab.

3. Click the ?Settings? button under the ?User Profiles? subsections.

4. Select a user profile and click the ?Copy To? button.

5. Now a dialog box will appear asking you where you want to copy the profile to. Create a folder (Name it whatever the old profile folder was called. So if the user name is MegaMan X and his files are stored in a folder called MegaMan X make sure to copy his profile to a folder on the new partition called MegaMan X) on the partition you will use to store the profiles from now on and copy the profiles into them (Make sure you create a new folder for each user since all information in the folder being copied to will be erased).

6. Log out of the account you are using.

7. Log in as the second Administrator and copy the remaining profile to the new partition.

Well you?ve made it this far, good. For the next part make surStep 2e show hidden folders option turned on.

Step 2

Ok now you?ll want to go into the ?C:\Documents and Settings? folder and copy the ?All Users,? ?All Users.WINDOWS,? and ?Default User? folders onto your new partition. This should go by without any problems.

But there is one big problem. There are at least two other folders in the ?C:\Documents and Settings? folder. They can not be seen but trust me they are there and you can finish this task without moving them first. The besStep 3ly way I know of) to accomplish this is to use a registry hack.

Step 3

Please note that this part deals with editing the registry which can damage your system if done wrong. But also note that you should write down every key you are working with and the original value unless you want to re-read this whole section later to get their names again (you have to reset them later).

Ok go into the registry (if you don?t know how to do this I advise not even attempting this trick). Go to ?HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList? and look for the value called ?ProfilesDirectory? (which should be set at ?%SystemDrive%\Documents and Settings?). Change it to X:\ (take note from here on out X: means the letter of the partition you?ll be using, so if your going to be moving everything to the E: partition replace X with E).

Now take not of the sub keys that all start with an S. These keys are paths to all the profiles currently on the machine. There are two in particular you?ll want to take note of, the LocalService (S-1-5-19 on my machine, yours could be different) profile and the NetworkService (S-1-5-20 on my machine, yours could be different) profile.

Under both of these keys there is a value called ?ProfileImagePath? which is the location of the profile. The value in the S-1-5-19 key should be ?%SystemDrive%\Documents and Settings\LocalService? and the value in the S-1-5-20 key should be ?%SystemDrive%\Documents and Settings\NetworkService.? You will want to change both of these to Step 4 the new partition. So they should read ?X:\LocalService? and ?X:\NetworkService.?

Step 4

The next thing you?ll want to do is set one administrator account?s profile path to the new partition. The profile paths for these accounts are located in the same ?HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList? key. Each user will have a registry key that follows the form of S-1-5-21-XXX (XXX is a long series of numbers, not porn in this case) and the quickest way to find which user has what key is to look at the ?ProfileImagePath? value and take note the date (which is probably ?%SystemDrive%\Documents and Settings\<UserName>? where <UserName> is the user?s name obviously). Find one of the administrator accounts and chance the ?ProfileImagePath? value to ?X:\<UserName>.?

Also make sure you create an X:\NetworkService and an X:\LocalService folder (X:\ being your new partition again).

Make sure you read, understStep 5owed all the following information above this point or you could find yourself royally screwed! Next reboot your computer.

Step 5

So your computer isn?t dead? Good that means you have done everything up to this point correctly. Ok log into the administrator account that you relocated the profile of (The one you altered the ?ProfileImagePath? registry value for).

Remember this, from here on out there is no easy going back. If you want to abort this I recommend you do it now. If you wish to continue please keep reading.

Here comes for fun part, delete the C:\Documents and Settings? directory. If Windows says it?s a protected directory or a file is in use you missed something above. Now create a new folder and name it ?Documents and Settings? (I know what your thinking. Why delete a directory just to make it again? Simple there are two folders in there called LStep 6nd NetworkService that you can?t see but must delete and the only way to do this is to delete the parent directory).

Now comes the fun part.

Step 6

Windows NT based system (at least XP but I?m sure others) can mount partitions as folders (much like *NIX systems do). To accomplish this you?ll need to go to the ?Control Panel? and open ?Administrator Tools.? Select ?Computer Management? and go into the ?Disk Management? item. All your partitions should be listed so right-click on the partition you are going to be using for storing profiles (X:\) and select ?Change Drive Letter and Paths?? from the menu.

In the new dialog box click the ?Add? button. Another dialog box will open, select ?C:\Documents and Settings? and click ?OK? (note you can only mount partitions in completely empty folders, if you can?t mounts the new partition in ?C:\Documents and Settings? it?s not actually empty and you probably missed a step above). Now if you open ?C:\Documents and Settings? you?ll notice it actually opens the X:\ partition. Sweet deal huh? As far as I can tell this is completely transparent to any other programs soStep 7ing to open ?C:\Documents and Settings\All Users\Something? will actually be going to another partition without even realizing it. Which was the main idea behind this little hack.

Step 7

Now comes the easy part, putting everything all back togetheStep 8ember all those registry keys you changed? Well you have to put them back to the way they were before you started this little hack (I told you you?d have to do this, hope you wrote everything down).

Step 8

Ok if it worked this is the part where you celebrate and jump for joy. If it didn?t work this is the part where you probably plot my destruction. In the later case please make the plan quick and painless as I have a thing against pain, I just don?t like it.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.