Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to change location of Users folder

07 Jul 2012   #1
SimonDahlquist

Windows 7
 
 
How to change location of Users folder

Here is a step by step solution of how to move your Users folder in Windows 7:

The easiest way to move Users folder, new installed OS or not is

1. Start command prompt from installation DVD
1.1. Start your computer with installation DVD
1.2. After entered Language to install, Time and currency format and Keyboard or input method, Click Next.
1.3. On next window, Click Repair your computer
1.4 Click on Command prompt
2. Identify your drive letters
2.1 In recovery mode, drive letters are change from your common drive letters:
C: this is virtual C-drive
E: this is your C-drive
D: this is your first extra HDD
3. Copy your Users folder to destination of your choice.
3.1 Use command: robocopy /MIR /SEC /SECFIX /XJ [homedrive]\Users [destination path]
Example: robocopy /MIR /SEC /SECFIX /XJ E:\Users D:\Users
3.2 Make sure all files are copied with no errors reported in the end.
4. Remove your [homedrive]\Users folder
4.1 Use command: rmdir /Q /S [homedrive]\Users
5. Create hard link from [homedrive]\Users to [destination path]
5.1 Use command: mklink /J [homedrive]\Users [destination path]
This destination path shall be with the normal drive letter, not the letter changed in Recovery mode. This may differ on your computer.
6. Restart computer and log in. You're done.


My System SpecsSystem Spec
07 Jul 2012   #2
Kari

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

Hi Simon, welcome to the Seven Forums.

Here two even easier methods, from our Tutorials section:
User Folders - Change Default Location
User Profiles - Create and Move During Windows 7 Installation

Kari
My System SpecsSystem Spec
07 Jul 2012   #3
SimonDahlquist

Windows 7
 
 

I know there exists other ways to change the folders for users in GUI.

Benefits of the solution above:

1. All shortcuts to/from and in your users folders works correctly after the change.

2. All new users on the computer affects of the change, even if they don't notice.

3. All programs last used files works correctly both Microsoft standard programs and third party softwares.

Therefore I posted this solution on how to change folders without any disadvantages what I've noticed.
My System SpecsSystem Spec
07 Jul 2012   #4
Kari

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

This tutorial runs a simple script that changes two Windows 7 environment variables, locations of ProgramData and Users. It creates all future user accounts in the new location of Users and does not need any junctions / hard links / deleting / copying, working thereafter 100% guaranteed. It also moves the Windows system folder ProgramData which can grow to be too big.

By changing the values of two internal environment variables with a simple script (provided in tutorial, you just need to change the drive letter) using the built-in System Preparation Tool you can be sure the system will work as you intended.

Your method is OK, it's just too complicated to my taste. It's also not 100% sure; When Windows "breaks down" it has a tendency to forget hardlinks and junction points, whereas it never forgets it's own internal environment variables.

But, as I mentioned, your method is OK and works. That's the main thing. Thanks for sharing.

Kari
My System SpecsSystem Spec
08 Jul 2012   #5
SimonDahlquist

Windows 7
 
 

I've seen a lot of tutorials that change User folder during installation of Seven and they have some fix to use the same tutorial on used systems too.

I haven't seen any of these solutions that keeps shortcuts to files in Users subdirectories intact, cause these shortcuts are stored fix and not relative to Users folder path. An example of this is the list of reasently used projects in VS 2010.

Or have I missed something here?

I would be more than happy if there was an easier way to change location of system folders.

These copy and deleting procedure in my guide is just to be safer. Just add switch /MOVE to robocopy and you're done in just two simple command lines:

robocopy /MIR /SEC /SECFIX /XJ /MOVE E:\Users [Destination with recovery drive letter]
mklink /J E:\Users [Destination with normal drive letter]

What can go wrong with the junctions? Even if the C-drive totally crashes and need a replace, all your users and files are still there. The only thing needed after new installation of Seven is:

rmdir /S/Q E:\Users
mklink /J E:\Users [Destination with normal drive letter]

Thanks a lot for the really fast support on this topic by the way.

Cheers

Simon
My System SpecsSystem Spec
Reply

 How to change location of Users folder




Thread Tools





Similar help and support threads
Thread Forum
Script to change the location of Documents folder in Windows 7
Hi! I currently inherited a Windows 7 image that has the default location for the users' My Documents folder configured incorrectly. When a domain or local user account logs in to the machine for the first time the Documents directory, which by default should be located on %userprofile%\Documents...
General Discussion
How do I change the default location for temp burn folder?
I tried the recording tab for in properties of the drive and it didn't do anything. I haven't found one single decent tutorial online to mess with my regedit, I will mess it all up. I have a small master drive and terabytes of externals, I just want to move any burn folders to my larger drives...
Customization
how to change default location of Windows Explorer folder?
I've tried to search this but I'm finding answers to everything else instead. I want to change the default location of Windows Explorer after left-clicking the icon on my taskbar. I want to set it to the username (C:\Users\Tim) folder where my 'Downloads' folder and all those other folders are....
Customization
How To Change Users Directory Default Location?
I tried changing the location of a user's profile and it worked thanks to an article from this swebsite, but I deleted the whole user because I want to move the Users Directory all at once instead (from C to D for example). Is there a way to do so? I found a website that explains how but it...
General Discussion
Change location for Selecting groups or users (Trying to share a HDD)
Hi, I'm trying to share my external Hard Drive over my home network and I have sharing enabled on this drive, then I tried to get the other computers on my network to connect to it, It says they don't not have permission to connect. So then I tried to add permission in the Advanced Sharing...
Network & Sharing
Change default Browse for folder location
Hi, I want to change the default browse for folder dialog to point to Computer in any application that uses this dialog. I do not use the explorer task bar icon, I have set my task bar to look like vista's The first image is the current state, the second is what I'm after. Had a look at...
Customization

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:05.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App