16

I would like to move the default location of my c:\Users\USERNAME to another drive. What is the easiest way to do this and how?

I know that I can move each of my "Special Folders" like Documents, Pictures, etc. but that does not include the AppData folder. Also, many programs and installers incorrectly put stuff in C:\Users\USERNAME\Documents etc. even after I moved Documents to another drive and I end up with duplicate folders.

duckworth
  • 700
  • 3
  • 10
  • 12
  • 1
    Please see related question http://serverfault.com/questions/8187/whats-the-best-way-to-move-c-users-to-d-users-under-vista-w7 – Scott Jul 23 '09 at 14:34
  • Possible duplicate of [What's the best way to move c:\users to d:\users under vista/W7](https://serverfault.com/questions/8187/whats-the-best-way-to-move-c-users-to-d-users-under-vista-w7) – ivan_pozdeev Jul 24 '18 at 22:55

5 Answers5

11

For individual folders (My Docyuments, My Pictures, etc., the "Special Folders") I do the registry/GPO thing you alluded to. However, if I want to move the entire folder structure I cheat. Move the folder to a new location, and then create a junction pointing the old folder to the new folder. So all your programs will still think the folder is c:\users\username but that's just a junction point to d:\users\username.

WaldenL
  • 1,248
  • 1
  • 14
  • 26
  • 2
    This is what I do with all my machines. I usually boot to the windows install disk (or USB Drive) and robocopy the users folder to another drive using the /mir /xj (mirror, do not follow junction points) so that I get all of the correct permissions. Then as you said, create the junction to to point to the new location. – Jimmie R. Houts May 05 '09 at 13:50
9

I've spent a long time researching this and finally managed to do it on my own machine.

There are two scenarios here: a new install, and a machine that is already installed/used.

For a new install, you can (apparently) modify the autounattend.xml file (unresearched link here, no guarantees, I haven't tried)

For a machine that is already installed, there are two problems to overcome:

  1. Windows 'locking' some files, so you can't copy them (ntuser.dat)
  2. Changing where windows goes to look for the profiles on startup.

For problem 1, you can either go the round about route:

  • copy Default and Public folders to the new location
  • modify their location in registry
  • create a new user (which will be created in the new location)
  • login with new user account and copy the other users
  • lots of detail on this here

Or you can boot from a Recovery disk and copy stuff across.

For problem 2, you can either do a find and replace everywhere in the registry (risky), or create a symlink/junction from the default location to the new location.

The find and replace solution is also detailed on the previously linked page, but it turns out that you still have to create the symlink, otherwise Windows Update has problems.

WHATEVER you choose to do, you will need to get familiar with symlinks/junctions. Lots of comments on Josh's blog mention ROBOCOPY, which you can't use to copy Junctions. If you don't recreate them, you won't notice immediately as most (if not all) have the hidden attribute anyway, but you may experience reverse compatibility problems with non-Vista apps.

This blog post provides a bit more (too much) detail about this issue, plus a script to help recreating the symlinks/junctions.

Another blog, another approach.

Benjol
  • 202
  • 1
  • 12
1

You CAN change the location of AppData, just a bit longer :

Open AppData Right Click on Local Click the location tab, and click Move Create an AppData folder somewhere, and create a folder Local in it Select it, click apply to move it, just like you did for Documents.

Repeat for LocalLow and Roaming.

This should be far better than the symlink OR the sysprep method.

Milind R
  • 133
  • 9
1

I've recently had the same issue. I wanted to use Microsoft's SteadyState program on a machine with pre-existing user accounts on C:\USERS that I wanted to move on D:. I followed these steps:

  1. I imaged the hard disk to be able to recover from the disaster I expected to experience.
  2. I used Windows Easy Transfer to copy these accounts to an external hard drive.
  3. I deleted the accounts.
  4. I installed Windows SteadyState (works on XP and Vista), and used it to create accounts with exactly the same name as the one I deleted. I created each one on the D:\ partition (SteadyState allows you to choose!)
  5. I started Windows Easy Transfer to restore the previously saved accounts, telling it to copy over the accounts of the same name. It finds them all on D:\ and that is where it puts the copy! Success.

The one proviso is that Windows Easy Transfer doesn't make a perfect copy of most non-microsoft apps.

Hope this helps.

-1

I have been told you can to this by:
1) Open 2 Windows explorer windows (one to the new drive, one to c:\USERS)
2) create new folder to store information on the new drive
3) right click and drag the USERNAME folder to the new folder. When the right click menu pops up, click on "Move".

To see if it worked click start, documents then click on empty space in the address bar to see if it says NewDrive:\NewFolder\USERNAME\Documents

Adam Lerman
  • 117
  • 1
  • 3