Windows

  • Windows 7
  • Windows
  • All forums
Question

Win7: how do I move user folder to a different drive

 (with all its registry tentacles taken care of)

Related to this question but somewhat different (using Win7 RC)
I would like to move the user folders for all family members to E:\
What is the best way?
When I cut and paste, I am warned about a bunch of system folders. Also, I don't see the LOCATION tab when I click properties.

    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation
112 People had
this question

Was this helpful?

61

Votes

Answer

When creating a clean install, using the combination of an SSD system drive and a conventional disk drive, as a data drive, there is a way to "move" the Users folder (normally, C:\Users) and the hidden ProgramData folder (normally C:\ProgramData) to the conventional disk, or data drive, using an answer file, or unattend.xml, for an unattended installation, as mentioned above.

For an individual doing a single, one-off installation, trying to figure out how to create an answer file for a completely unattended installation, just to accomplish this one small task, is way, way too much trouble.  It's also not necessary.

It is possible, during the course of a conventional, interactive installation from an installation disc or USB thumbdrive, to enter what is called, "Audit Mode", before the Computer is named or a Username created, and accomplish the necessary re-assignment.

1.) Do a conventional installation.  If you are using an SSD, at the point in the installation process where you are asked where you want to install Windows, you should use Drive Options to remove any partitions on the SSD, before selecting the SSD as the target.  Do not manually partition or format the drive, prior to installation.  Windows 7 will do this, and must do this, because Windows needs to align the logical format with characteristics of the physical drive, and, also, Windows wants a small system partition for its own purposes.

2.) When the installation stops, waiting for you to give the computer a username and a computer name, DON'T!  Press Ctrl+Shift+F3, and the computer will restart in . . . (wait for it!) "Audit Mode"!.  Basically, Windows will create a throwaway Administrator account and sign you in, as this throwaway Administrator.  Nothing you do, with regard to this temporary user will survive finalizing the installation, but the computer operates normally, and you can install drivers and software.  Whenever the computer starts in Audit mode (you are allowed to restart), a GUI version of Sysprep.exe will pop up, offering to restart the computer in OOBE (out of box experience).  OOBE is where you were a moment before -- that is, where you create a username and computer name and the installation is finalized.  Don't choose to restart in OOBE until you are ready to finalize the installation.

3.)   You need to know what drive letter (or folder location) is going to be assigned to your Datadrive disk.  So, this would be the time, in audit mode, to figure that out.  If you need to partition or format the datadrive, do it now.  On the Start Menu, right-click on "Computer" and choose Manage from the context menu, to get to the Computer Management console.  In the Computer Management console, under Storage/Disk Management, you will find the tools to change drive letters, partition, etc.

4.)  You need only a minimal answer file.  This is an xml file (a text file), created in the Windows System Image Manager application.  You can call it whatever you like.  I'd suggest: folders.xml.  Here's the content of a folders.xml file, which will re-locate Users and ProgramData to D:\

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>d:\Users</ProfilesDirectory>
                <ProgramData>d:\ProgramData</ProgramData>
            </FolderLocations>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:h:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

I am going to imagine a scenario, where you make this file on another computer, and transfer it to the computer, where the installation is being done, using a USB flashdrive, which, when plugged in, to the computer in Audit Mode, is assigned the driveletter U: 

You could probably just copy the text above into notepad and save it as a textfile with the extension, .xml and be good to go, provided you wanted to use d:\Users and d:\ProgramData as your Datadrive locations.  (I've used this answer file, successfully; I don't guarantee that it will work for others.)

5.  To use the folders.xml, located in the root directory of your USB flashdrive, plugged in and visible as U:\, you need to open a command prompt, navigate to c:\windows\system32\sysprep and give this command:

sysprep.exe /audit /reboot /unattend:U:\folders.xml

This will cause the computer to reboot, but you will end up right back in Audit Mode.  As long as you are still in Audit Mode, the re-location of these folders will not be complete, because the temporary Administrator useraccount still has its stuff in C:\Users and there are still some active databases in C:\ProgramData.

6.) Now, you need to say goodbye to Audit Mode.  Remember that a GUI for using Sysprep to initialize the OOBE shows up, each time you re-boot into Audit Mode.  So after you reboot in 5.) you will have your chance to run it.  (If this is your personal computer, don't check the "Generalize" box in the Sysprep GUI.)

7.) Finish your Windows installation, create a permanent username and giving the computer a name, etc.  When you are finally up and running, go look at C:\  C:\Users should be gone.  C:\ProgramData is probably still there, but it's normally hidden, so you won't see it, until you go into Folder Options and check Show Hidden Files and Folders.  D:\Users and D:\ProgramData (hidden) should also exist. 

8.) I like the idea of using Junctions to intercept any program foolish enough to hardcode to c:\users or c:\programdata  You'll need to delete or move C:\ProgramData, before creating a Junction at C:\ProgramData pointing to D:\ProgramData.  The command line tool, mklink, is useful here.  Open a command prompt, and type mklink /? for instructions.  If you prefer a right-click GUI tool, check out:http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

After having created the Junctions, I believe you could use regedit to edit the ProfileList key back to the original C:\ locations.  folders.xml will have modified the Folderlist key, so that everything points to D:\ instead of %systemdrive%\ or C:\   I'm not sure what the point would be, but you could.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

11

Votes

Answer
I suspect your question is really "How to I move the My Documents, My Pictures, etc. folders for family members to E:\?"

In Win7, as very different from Vista, the "Documents" virtual folder is not a conventional directory. If you open it, however, you can right-click on the "My Documents" real folder and its properties do have the "Location" tab, just as with Vista. The return to "My Documents" a la XP threw me, too, when I first saw it.

The same trick works for "My Pictures" and so on. Note that the Libraries functionality in Win7 is potentially a great tool, but it also opens the door to complete mayhem if you have several family members on the same system: document, picture, etc., folders can be physically anywhere while still appearing under the relevant Library tab in 7. If undisciplined users realize the possibilities, you could experience unexpected "drive full" issues where you least expect them. Best to have a quiet talk with said family about where to create their folders.

Alan
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

7

Votes

Answer
This is not something I recommend, since it can cause adverse effects on the systems stability:

http://www.winhelponline.com/articles/95/1/How-to-move-the-special-folders-in-Windows-Vista.html


Andre Da Costa http://adacosta.spaces.live.com http://www.activewin.com
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Andre Da Costa

Community Moderator
techingiteasy.wordpress.com
Windows Expert - Consumer

Was this helpful?

5

Votes

Answer

Related to this question but somewhat different (using Win7 RC)
I would like to move the user folders for all family members to E:\
What is the best way?
When I cut and paste, I am warned about a bunch of system folders. Also, I don't see the LOCATION tab when I click properties.


You are really going to need your industrial grade pocket protector for this one. (Geek power on full, Mr. Sulu :)

DISM is a command line utility to add stuff to the new 7 'image' on the setup disk. (Install.WIM, usually) Another utility, ImageX.exe, 'mounts' the image, so Deployment Image Management, and Servicing(DISM) can load a file named 'unattend.xml' to the image. (all this is a part of the Windows AIK)

Download details Windows Automated Installation Kit (AIK).url:

DISM.exe /Image:<path_to_ image_directory> /Apply-Unattend:<path_to_unattend.xml>

The unattend.xml, of course, assigns the ProfilesDirectory location

Taking it down a notch, the setup.exe will load an unattend.xml of you own creation 'on the fly' by running setup with an argument

 setup /unattend:<path>\unattend.xml

Your running system can adjust this with another DISM command:

DISM.exe /Online /Apply-Unattend:<path_to_unattend.xml>

This assumes you own the AIK, and depends on the creation of the unattend.xml
Best Practices for Authoring Answer Files

Walkthrough: Build an Answer File for BIOS-Based Computers


Rating posts helps other users
Mark L. Ferguson MS-MVP
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Mark L. Ferguson

Mark L. Ferguson

Rating posts helps other users
Mark L. Ferguson MS-MVP

Was this helpful?

3

Votes

Answer

I should add that Andre is right, MS states it here

This setting should be used only in a test environment. By changing the default location of the user profile directories or program data folders to a volume other than the System volume, you will not be able to service your Windows installation. Any updates, fixes, or service packs will fail to be applied to the installation. Microsoft does not recommend that you change the location of the user profile directories or program data folders.

ProfilesDirectory
Rating posts helps other users
Mark L. Ferguson MS-MVP
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Mark L. Ferguson

Mark L. Ferguson

Rating posts helps other users
Mark L. Ferguson MS-MVP

Was this helpful?

11

Votes

Answer
I suspect your question is really "How to I move the My Documents, My Pictures, etc. folders for family members to E:\?"

In Win7, as very different from Vista, the "Documents" virtual folder is not a conventional directory. If you open it, however, you can right-click on the "My Documents" real folder and its properties do have the "Location" tab, just as with Vista. The return to "My Documents" a la XP threw me, too, when I first saw it.

The same trick works for "My Pictures" and so on. Note that the Libraries functionality in Win7 is potentially a great tool, but it also opens the door to complete mayhem if you have several family members on the same system: document, picture, etc., folders can be physically anywhere while still appearing under the relevant Library tab in 7. If undisciplined users realize the possibilities, you could experience unexpected "drive full" issues where you least expect them. Best to have a quiet talk with said family about where to create their folders.

Alan
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

7

Votes

Answer

Alan,

That would really not be the question.  The real question is: how do you make ALL the user data reside on a data drive. 

In my case, I am using an SSD drive for the OS and want all the data to be on a data drive.  Yes, you can "move" the Documents, Music, etc folders, but that does not move all the user data.  Doing a clean install from Windows 7 RC to the retail version proved that point when I started tracking down all my data.  There is a lot of user data that, by default, goes in to the C:\Users\<user> folder.  I want all that data to be on the D, mirrored drive.  (Yes, the C:\Users\<username>\AppData folder DOES have the "Location | Move" option, but it does not work as files are locked by the system.)

From the research I've done, it seems the best solution, as indicated by Mark above, is to use the unattend.xml during the installation.

-Rick
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

1

Vote

Rick/Mark,

I've just installed Win7 HP 64 on a clean re-build.  Now I want to make all the user data files go on a separate, mirrored drive (like yours Rick).  I've read all of the above, and it sounds all well and good, but it appears that Mark's solution only works when you're installing Win7...not post-install. 

It's simple to do this in WinXP, why can't it be simple with Win7?  Any ideas?

-Chuck

    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

6

Votes

Hi Chuck,
I tried Mark's procedure. It worked well. It took me 2 hours.
My experience was, that installing with an unattended.xml file is as simple as it was with XP. The nightmare is really to deal with huge tools and GBs of data in images and so on to generate that little xml-file.
What I do NOT accept is the MS statement above on maintenance. This attitude of MS simply to DECIDE how we have to handle OUR data is completely inappropriate. It's not acceptable at all when I would get no maintenance after having relocated MyDocuments to another volume.

Uwe
Regards Uwe
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

6

Votes

Hi Uwe

I'd just like to draw your attention to the following paragraph on this page: http://support.microsoft.com/kb/949977

"The Windows Automated Installation Kit (AIK) and the Windows OEM Preinstallation Kit (OPK) for Windows Vista SP1 and for Windows Server 2008 contain documentation warnings that are related to the usage of the ProfileDirectory and ProgramData unattend settings. These are the settings that let you relocate the Users directory and the ProgramData directory to locations other than their default locations. This includes other disk drives.

These warnings were included before the servicing stack update (update 937287) was available. This update addresses the issue that is discussed in the warning text. Windows AIK and the Windows OPK documentation reads as follows. The Important notes no longer apply. The Caution notes still apply."

The "Important notes" that "no longer apply" are:

"Important:
These settings should be used only in a test environment. By changing the default location of the user profile directories or program data folders to a volume other than the System volume, you will not be able to service your Windows installation. Any updates, fixes, or service packs will fail to be applied to the installation. Microsoft does not recommend that you change the location of the user profile directories or program data folders."

Regards

MS
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

5

Votes

Hi, this thread is great.  Unfortunately I have already installed Win7 and prefer to avoid doing so again, so unattend.xml would be my least preferred choice. However, I am still confused as to what constitutes best practice.  In my search for the answer I found 3 possible approaches.  I have appended links to the threads I found most useful (some of these discuss Vista; apparently Windows 7 behaves the same way).  I am looking for the most reliable set up in the case of a total hard drive failure.  Ideally I should be able to load an image of my operating system and program files onto a new hard drive and be up and running immediately with full access to all my data and documents that reside on an external hard drive (also backed up of course).  No having to fiddle with program settings in skype, firefox, outlook, to name a few.  Also there should be no impairment of windows ability to index data and no restrictions impact on future updates/upgrades.

To date I have been using Ghost 14 for image backups on XP (and I have heard that it works on Win 7 despite what Symantec would have you believe) but I may be able to rely on the inbuilt imaging capability in Win 7.

1 - Use the Location tab to change the location of the User sub folders.  Pros - easy; cons - doesnt work for all user folders, especially those that contain your .pst files
http://www.w7forums.com/change-location-my-documents-folder-t338.html
http://hubpages.com/hub/Windows-7_-_Moving_My_Documents
http://www.sevenforums.com/tutorials/18629-user-folders-change-default-location.html
http://www.edbott.com/weblog/?p=1371

2 - Use regedit to change the location of the user sub folders and the root users folder.  Pros - referenced by most as the way to go; cons - sounds very fiddly (Joshua Mouch did lots of copying and pasting); unclear impact on indexing and windows upgrades
http://joshmouch.wordpress.com/2007/04/07/change-user-profile-folder-location-in-vista/
http://www.windows7hacker.com/index.php/2009/05/how-to-change-user-profile-default-location-in-windows-7/

3 - Use symbolic linking to change the location of various user folders - pros - looks easy, cons - unknown reliability
http://www.windows7home.net/how-to-move-user-data-folder-to-non-system-partition-in-windows-7vista/
http://www.starkeith.net/coredump/2009/05/18/how-to-move-your-windows-user-profile-to-another-drive/
http://tuts4tech.net/2009/08/05/windows-7-move-the-users-and-program-files-directories-to-a-different-partition/

Has anyone compared updating registries vs the symbolic link approach?  On further reflection what is the downside of the operating system image including the Appdata folder? If there is no downside then approach 1 probably works fine.  Can I undo any of the above approaches and try a different one? or is it a case of new install each time?

Thanks, Marco
    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation

Was this helpful?

6

Votes

Hi, this thread is great.  Unfortunately I have already installed Win7 and prefer to avoid doing so again, so unattend.xml would be my least preferred choice. However, I am still confused as to what constitutes best practice.  In my search for the answer I found 3 possible approaches.  I have appended links to the threads I found most useful (some of these discuss Vista; apparently Windows 7 behaves the same way).  I am looking for the most reliable set up in the case of a total hard drive failure.  Ideally I should be able to load an image of my operating system and program files onto a new hard drive and be up and running immediately with full access to all my data and documents that reside on an external hard drive (also backed up of course).  No having to fiddle with program settings in skype, firefox, outlook, to name a few.  Also there should be no impairment of windows ability to index data and no restrictions impact on future updates/upgrades.

To date I have been using Ghost 14 for image backups on XP (and I have heard that it works on Win 7 despite what Symantec would have you believe) but I may be able to rely on the inbuilt imaging capability in Win 7.

1 - Use the Location tab to change the location of the User sub folders.  Pros - easy; cons - doesnt work for all user folders, especially those that contain your .pst files
http://www.w7forums.com/change-location-my-documents-folder-t338.html
http://hubpages.com/hub/Windows-7_-_Moving_My_Documents
http://www.sevenforums.com/tutorials/18629-user-folders-change-default-location.html
http://www.edbott.com/weblog/?p=1371

2 - Use regedit to change the location of the user sub folders and the root users folder.  Pros - referenced by most as the way to go; cons - sounds very fiddly (Joshua Mouch did lots of copying and pasting); unclear impact on indexing and windows upgrades
http://joshmouch.wordpress.com/2007/04/07/change-user-profile-folder-location-in-vista/
http://www.windows7hacker.com/index.php/2009/05/how-to-change-user-profile-default-location-in-windows-7/

3 - Use symbolic linking to change the location of various user folders - pros - looks easy, cons - unknown reliability
http://www.windows7home.net/how-to-move-user-data-folder-to-non-system-partition-in-windows-7vista/
http://www.starkeith.net/coredump/2009/05/18/how-to-move-your-windows-user-profile-to-another-drive/
http://tuts4tech.net/2009/08/05/windows-7-move-the-users-and-program-files-directories-to-a-different-partition/

Has anyone compared updating registries vs the symbolic link approach?  On further reflection what is the downside of the operating system image including the Appdata folder? If there is no downside then approach 1 probably works fine.  Can I undo any of the above approaches and try a different one? or is it a case of new install each time?

Thanks, Marco

With all due respect, this seems like a complex and backward approach when dealing with PST files.  Using the settings wizard in Outlook, why not either create a new PST file in a folder in your Documents folder, or move the current ones to it from the Appdata\local\Microsoft\Outlook folder?  Its very easy to do, you just point Outlook to the new location, which can be on any drive.

I've used this method for years with no problem, so that my Outlook files will be easily backed up along with the rest of the contents of my Documents folder.

There is even a simple workaround for the OST files used by Exchange or Hotmail connector.  You create a new PST in your Documents folder, then, within Outlook, create a Rule to send all mail from the account to the new PST that you have created, which will empty the OST files in the Appdata folders.  You can't reliably move the OST files, but they will remain empty and very small, since they will only be used fleetingly for data transit.

As for data backup and restore, Windows 7 has made this a dream compared to earlier versions.  I found that rather than make a separate image and data backup, all I need is to make a system image file on an external USB drive.  You can back up the data separately, but there is a little known feature of that image that makes the time- and space-consuming dual backups uneccesary.

You can mount the image, which is seen as a .VHD (Virtual Hard Drive) file in a subfolder of the WindowsImageBackup folder.  In the Computer Management console, if you right click on the Disk Management, you can mount that .VHD image as an extra hard drive.  You now are capable of copying anything to and from that duplicate of your system drive, provided you don't make it read-only when mounting it.

I schedule a Windows Image backup once a week, but if there are any important files to backup in the meantime, I just copy them to the mounted VHD.  If you have to replace any corrupt system files on your C: drive, you can choose a restore point that is located in the VHD, or if you have an hour or so, restore your whole system, including the data, with this same image.

This is one of the main reasons that I'm lovin' Windows 7.

    • Child exploitation or abuse
    • Harassment or threats
    • Inappropriate/Adult content
    • Nudity
    • Profanity
    • Software piracy
    • SPAM/Advertising
    • Virus/Spyware/Malware danger
    • Other Term of Use or Code of Conduct violation
<< PreviousPage of 10 Next >>

Message marked as answers cannot be deleted

To delete this message, first unmark this message as an answer, then delete it.

Reason to remove escalation


Merge

Enter the thread ID of the thread you are merging into


Reply will be posted to a public thread

You are replying to a public portion of this thread. To reply privately, click Cancel, click the Private Messages tab, and Reply on that private message.

Don't show this message again

To report abuse, sign in or continue without signing in

Thank you.

Report abuse

Abuse type:

Details (optional):

Report abuse

Abuse type:

Details (required):
Enter the characters you see (required):
Type the numbers that you see in the picture.
Play audio and type the numbers that you hear.
Show a different picture.

Sign in

Hotmail, Xbox Live, Messenger, or msn accounts will also work.

Don't have one of the above accounts?

Signing in...
This page will automatically update after you are signed in.
If you are having problems, you can close this message and try to connect again.