Solved How to change location of Users folder

SimonDahlquist

New member
Local time
8:34 AM
Messages
3
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.
 
Last edited:

My Computer My Computer

At a glance

Windows 7
OS
Windows 7

My Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
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 Computer My Computer

At a glance

Windows 7
OS
Windows 7
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 Computer My Computer

At a glance

Windows 10 Pro x64 EN-GB1.6 GHz Intel Core i7-720QM Processor6 GBATI Mobility Radeon HD 5850 Graphics
Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
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
 
Last edited:

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Back
Top