Moving the User files from C: to D: Data drive on an Asus B400a laptop.

The ASUS laptop came with Windows 7 Pro. The hard drive was set up with a C: and D: partitions. But the way the OS was loaded from the factory, it was very difficult to move the user folder. The hard drive is Capacity 465 GB in size, divided into 4 partitions. The 2 partitions are the C: OS and D: Data. The C: partition is 186 GB and D: is 254 GB.

The Location tab in properties for moving the profile folders is missing.

Location tab image

The location tab exists for 'My Documents' but not 'Keith'. I want to move the folder User to the Data drive.

The 'Google Drive' folder is extremely difficult to move. Copy the contents from the drive folder into a temporary folder. Get rid of 'Google Drive' before starting! The folder permissions might need such commands like 'takeown', 'icacls', or 'cacls' to remove permission so the folder can be deleted. Sometimes these commands do not work.

Here is a snap shot of the Asus's drive layout:

Disk Layout image

After trying a few methods, I finally decided to try the method that puts the data on the Data drive during the OS set up. I found these instructions: Moving Windows 7 User Profiles during Installation from the internet search engine. This proved to be the most useful.

Moving Windows 7 User Profiles during Installation

1. Start Installing Windows 7 and when the set-up program asks for you to Select a User Name ande Password. DON'T DO IT
Action: Press SHIFT + F10 – this will open the command prompt:

Command prompt image

Since the disk layout is ready for use, we skip a few steps:

We have prepared the hard drives and partitions, and they are ready for us to change the Windows 7 defaults. The next steps are to copy the default files and folders from the C:\ drive to the D:\ drive or any other drive or partition that you would prefer to use.

We are going to be using Robocopy , an XCopy tool that is built into Windows 7, to copy the directories.

Actions:

  1. Copy the Users directory from C:\Users\ to D:\Users\
    Enter the following command at the command line to achieve this:
    Robocopy.exe C:\Users D:\Users /E /COPYALL /XJ

  2. Copy the ProgramData directory from C:\ProgramData\ to D:\ProgramData\
    Enter the following command at the command line to achieve this:
    Robocopy.exe C:\ProgramData D:\ProgramData /E /COPYALL /XJ

Action: Type “regedit” at the command line and hit ENTER

Action:Navigate to the Windows 7 Profile List Registry Settings

  1. Locate the “ProfileList” in the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

  2. Update the following 4 registry settings from %SystemDrive% to D:\ (If you have chosen to use the D:\ drive as the new location)
    1. Default – D:\Users\Default
    2. ProfilesDirectory – D:\Users
    3. ProgramData – D:\ProgramData
    4. Public – D:\Users\Public

  3. Reboot the machine by running the following command
    shutdown /r /t 0

Action: Remove C:\Users and C:\ProgramData

  1. Remove C:\Users by running the following command:
    rmdir C:\Users /S /Q

  2. Remove C:\ProgramData by running the following command:
    rmdir C:\ProgramData /S /Q
You will not necessarily come across this step, however if you do, try another reboot.
Action: Reboot the machine by running the following command: shutdown /r /t 0

Cacls – to remove those files & directories that don't want to die.

Tech Net -- Cacls

If that still does not work then:
  1. Right-click on folder -> Properties
  2. Security Tab
  3. Owner tab
  4. Edit.. button
  5. Select Administrators in 'Change owner to', check 'replace owner on subcontainers and objects'..this might take a while
  6. Open cmd.exe as administrator
  7. Type cacls drive:\messedUpFolderName /T /e /g Administrators:f ...this might take a while
  8. Now remove the stubborn folder: rmdir /S drive:\messedUpFolderName

Create file system junctions to handle dodgy software

  1. Create the C:\Users junction by running the following command:
    mklink /J C:\Users D:\Users
  2. Create the C:\ProgramData junction by running the following command:
    mklink /J C:\ProgramData D:\ProgramData
  3. Reboot the machine by running the following command
    shutdown /r /t 0

You are now back at the Select a user name and name your computer

Action: You are now free to create a user name, name your computer and then log in once complete.

The junctions that you created above are visible in the root of the C:\ drive, and when you click on them it appears as if the files are on the C:\ drive, however they are really on the D:\ drive.

I hope this helps a few of you, especially if you have been stuck in the past trying to move C:\ProgramData to another drive.