Windows 7: Move Your Profile to a Secondary Drive

These days it is commonly recommended that you keep all your data files on a separate drive from your Windows installation. There are many benefits to this, mainly that you can re-install your OS at any time without it affecting your personal files. There are also various methods on how one might accomplish this. The most common method is just to have a separate drive setup, and you manually make sure to save all your data files there. One downside to this is sometimes there are files that you might not be able to manually choose where they get saved, such as a game's save data or log files for an IM program.

A slightly better option is to re-direct the special Windows folders to the other drive so that when an application saves to these folders the files are properly saved to the secondary drive. This works pretty well, and is relatively easy to set up. All you have to do is right-click each folder and go into it's properties and then change the path on the location tab.

I personally have always wanted to just redirect my entire profile folder to the secondary drive. I like to do this because I want to have the hidden AppData folder there as well so that various files stored there will be kept separate, such as my IM log messages, Thunderbird mail files, etc. I also have a few things I store in the root of my profile directory such as a bin folder for standalone programs and my SSH keys. There are two common methods that come up if you google how to do this out there on the web. I've tried both, and they both work, however they are both a bit of a pain to set up.

During a recent re-format and re-install I decided to try a new approach by modifying a registry setting I had just found out about a few days prior:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory. This method is by far the easiest I have seen which accomplishes the job of redirecting the entire profile.

For a clean install

The easiest way to manage this is by doing it during a clean windows install on a freshly formatted system. The first thing you need to make sure you do is partition and format data drive as well as your system drive to make sure it is available during the windows install process. There are two ways to set up your secondary disk. You can set it up at the same time windows prompts you for the installation drive, or you can do it later using the disk management utility. If all you need a simple partition formatted with NTFS, doing it early when windows prompts for an installation drive will work fine, and the secondary drive will default to the letter D. If you need to do something more advanced such as a raid setup, or want to control the formatting/letter assignment you will need to do it later using the disk management utilities.

Begin your windows installation and follow the instructions. You need to use "Custom install" instead of an upgrade when given the choice in order to format the drive and install a fresh copy of windows. Set up your drive partitions when prompted if you choose to do so at this point.

After a couple reboots, when you are presented with the welcome screen asking you to enter your desired username, press SHIFT+F10 to open up a command prompt.

If you need to set up your secondary drive or want to make changes such as modifying the drive letter it has been assigned (or if you just want to verify the drive letter it has been assigned) then enter the disk management utility by typing diskmgmt in the command prompt and press enter. When you are finished configuring your drive how you want it, make note of the drive letter it has been assigned and close the management tools and go back to the command prompt.

To redirect the profiles we will need to open the registry editor and modify the data of the ProfilesDirectory value. At the command prompt type regedit and hit enter to open up the registry editor. Navigate to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory and find the value ProfilesDirectory on the right-hand side. Double-click this value and change it to your desired profile path. For the purposes of this tutorial, I am putting the profiles on my D drive, so I would enter D:\Users as the new value.

With the value changed, close out of regedit and the command prompt and proceed with your Windows installation. TADA! Your new user profile will be created on the secondary drive, as will any other user profiles created in the future if you set up additional users.

For an existing install

So lets say that you already have your system setup just right, and you do not want to go through the hassle of re-formatting just to move your profile. Can you do it without having to re-format? Yes, you can. It is not too hard to do either. The first thing you'll need to do is log out of your profile and login as another administrative user. If you do not have any other accounts setup you will need to create one temporarily to use. You can remove it when you're finished.

Once you have logged into your secondary account, open a Windows explorer window and navigate to your C:\Users folder. Then open a second explorer window and navigate to where you want your profile to be moved to. Click and drag your profile folder from the first window to the second in order to copy it and it's contents over. You may be presented with a prompt saying you need additional privileges to perform that operation, click continue if so.

Next open regedit and navigate to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. There will be a sub-key under this key for the user you want to change. The key will be named something like S-1-5-21-*random-numbers*. To locate the proper key, select each one then check in the right-side pane the value of the ProfileImagePath value. It will contain the old path of the profile with the username at the end. Once you have found the correct key, modify it's ProfileImagePath value and change the path to the new path for your profile folder.

Once changed, reboot your computer then login again as your normal user account. To verify the move was successful, Press start, click your name to open your folder, and then create a new text document. After you have created the new text document, open my computer and browse to the location of your new profile folder. If you see the newly created text document there then the move was a success.

Once the move is successful, you can delete your temporary administrator account (if you had to create one) and your old profile folder on the C drive if you want.

Note that unlike the fresh install method outlined above, this method is on a per-user basis. You will have to repeat the process for each user, and future user accounts will still be created on the C drive initially.

Final thoughts

I have been running my system for a few weeks now after having used this method and have not had any issues with this type of redirection. All the programs I use work just fine with the redirected profile. Any program that is coded properly should work just fine with this type of setup. If you do happen to encounter a program that does not work though, you may be able to resolve the problem by creating a junction from the old location to the new location.

To create the junction, click start then type cmd. In the results list right-click cmd and select Run As Administrator. Change to the Users directory on the C drive by typing cd /d C:\Users and then create the new directory junction using the mklink command using your username as the junction name by typing mklink /J *YourUsername* *NewProfilePath*. Now windows will automatically redirect any requests for a file or folder under the old C drive profile to the appropriate file or folder under the new profile on the secondary drive.

I do not have access any longer to a Windows vista system, however I imagine the same steps would work there as well. I know the shift+f10 thing works during a Windows vista install as well (xp even) and the vista system is pretty similar. I tried a similar thing on Windows XP and it kind of worked. I do not run XP regularly though, so I cannot say whether it causes problems or not.

Support free Wi-Fi

openwireless.org

Support free maps

openstreetmap.org