User Profiles - Create and Move During Windows 7 Installation

How to Create User Accounts on another Partition or Disk During Windows 7 Installation

   Information
There are several methods to move user profiles to another disk or partition after you have installed Windows 7. The easiest way is to use Audit Mode and System Preparation Tool, both built-in Windows 7 features, to permanently move the location of the folder Users.

This tutorial shows how to relocate both Users and ProgramData to another disk or partition when doing a new, fresh and clean install of Windows 7. If you have already installed Seven, and you'd like to move those folders away from their default location in C: drive, please read first post number 22 in this thread. Follow the steps told in that post, and continue then from beginning of the page 4 in this tutorial.
When Windows 7 is installed, 5 or 6 system folders are created depending on chosen bit-version:

  • PerfLogs (Performance Logs), where Windows stores performance and reliability logs
  • Program Files, where applications and software are installed. Windows x86 (32-bit) stores all applications here, Windows x64 (64-bit) only native 64-bit applications
  • Program Files (x86), only in Windows x64. All non-x64 applications are stored here
  • Windows, which contains core operating system files and drivers
  • ProgramData, where some applications store application and user specific settings and configuration files
  • Users. This is the "home" of all user folders. When a new user account is created and this new user logs in first time, Windows creates a set of user specific folders Users\New_User
Moving Windows and Program Files folders is not recommend by Microsoft. However, moving both Users and ProgramData folders is safe and can save a lot of space on system disk. Pictures, mp3’s videos, documents and so on, a user folder with its subfolders can be tens, sometimes hundreds of gigabytes.

For instance, using this laptop of mine as an example, the total size of Users folder and subfolders is at the moment about 240 GB. The size of ProgramData folder is at the moment almost 18 GB. I simply could not have these folders stored in my system C: drive, there’s not enough space.

When installing Windows 7, I recommend using Windows System Preparation Tool (Sysprep) in so called Audit Mode to relocate Users and ProgramData, leaving C: drive only for Windows and applications.

   Warning

An upgraded Windows cannot be sysprepped. As this method is based in sysprepping, this tutorial is valid only for Windows setups which have not been upgraded.

This means that if you have for instance in-place upgraded Vista to Seven, you cannot sysprep. The same applies if you have upgraded from a lesser edition to a better edition, for instance from Windows 7 Home Premium to Professional.

Notice that a repair install is also an upgrade install, so if you have ever done a repair install (= in-place upgrade to same edition), you cannot sysprep.

In other words, when sysprepping an existing Windows setup it only works if the Windows was installed clean and has never been upgraded or repaired using repair install, or if it is the original pre-installed Windows.

Using this method causes Windows 7 to lose activation information, and it needs to be reactivated afterwards. If your Windows 7 is an OEM version, you might not be able to reactivate it, at least not without phone activation option.

   Warning
IE10 Users: Please read this article first: Sysprep Fatal Error With IE 10 (FIX) | System Administration


Complete tutorial as PDF: View attachment Relocate User folders during Windows 7 installation.pdf (1.22 MB)

Kari






 
Last edited:
I just wanted to report back that I used Kari's tutorial to move user profiles and programdata after having installed windows 7. One tip worth following that is in Kari's instructional PDF on page 1 of this thread (for fresh install) that is not on page 4 but worth knowing is that you will likely need to stop windows media by typing

net stop WMPNetworkSvc

at the command line. I needed to do this before running the script, after running the script, and I think again before rebooting out of audit mode. It took several attempts for me to figure out that I needed to stop windows media at more than just before running the unattend script.

Kari, I do have one more question. The script is responsible for changing the path of the userprofile and programdata such that it is not necessary to go into the environment variables tab and manually change these also?

Thanks again for the tutorial and also for answering all of my beginner-level questions.
 

My Computer

OS
Win7 Pro 64-bit
CPU
i7 870
Motherboard
Gigabyte GA-55A-UD3
Memory
16GB
Graphics Card(s)
FireGL 4800
Hard Drives
90 GB OCZ Vertex 2 SSD
1TB Samsung Spinpoint F3R
PSU
Antec Tru Power 650W
Case
Lian Li
:) Check the end of the last page of that PDF tutorial, that tip to stop WMPnetworkSvc is there ;)

No, if you used the xml script, that's it. Sysprep takes then care of changing the variables, it's hard coded in system and register after running the script. No additional tweaking is needed.

Kari
 

My Computer

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
Link to previous user folders

Hi,

I used this method when installing windows ages ago. I had to re-install windows unfortunately and I would like to know how to link back to the users folder from my last install? When I use the script from the tutorial it says fatal error, I believe this is because the users folder is already there.

Any help would be appreciated!
 

My Computer

OS
Windows 7 Ultimate x64
Hello Kavo, welcome to the Seven Forums.

Fatal error during sysprep should not occur because of existing folders. Did you check the end of the last page (page 8) of the tutorial, there's one possible reason and fix for it, to stop service WMPNetworkSvc and then run the script again?

Kari
 

My Computer

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
Nice to hear that!

:) Kari
 

My Computer

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
Thanks Heaps for all the work you've done on this Kari

Just wondering if you have had any luck automating the process of when a user folder exists already and you want to create it over the top, or just replace not have to worry about getting username.computername type folders

i only ask because at the start of next year we will have about 800 computers to do :cry:
 

My Computer

OS
Windows 7 X64 Pro
Hi Buffaloo, welcome to the Seven Forums.

The method described in this tutorial is meant to be used by single user on a single computer without need to download and / or install any additional tools and applications. When managing a network and deploying images to multiple computers, there are better and more flexible methods available.

Normal, I would like to say almost standard approach is to use WAIK and Windows PE. Here's some very informative sites for you to find out more:

Kari
 
Last edited:

My Computer

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
OK, I have tested a new, different scenario now on three PC's, and it works. Here's what you should do if installing Seven on SSD and relocating User folders using this method, or if for any reason wanting to move ProgramData and / or Users after Windows is already installed. This method can be used whenever you want to relocate Users to another disk on an existing installation of Seven.

If you want to install Seven on an SSD: Install Seven normally to SSD, disconnecting all other disks. After Windows has booted first time normally after installation, shut the computer down and reconnect other disks. Reboot Windows.

Relocating Users and ProgramData folders when Windows Seven is already installed:

Run Command Prompt as administrator by clicking Start Menu > All Programs > Accessories, then right clicking Command Prompt and selecting Run as Administrator:

View attachment 128354

Type this to command prompt: C:\Windows\System32\Sysprep\Sysprep.exe /audit /reboot, hit Enter.

View attachment 128355

Windows reboots now to Audit Mode, "thinking" it's been started first time as the message on screen shows:

View attachment 128356

Now continue from beginning of page 4 in tutorial, and follow the steps described. Running the script causes Windows to move ProgramData and Users folders from C: to another disk or partition, also moving all content of said folders. The later you do this, the longer it takes because Windows has more to move.

Notice that this really makes Windows think it's first boot, so you have to select country and keyboard layout and again create a user account when first time booted in OOBE (normal) mode after running the script. Because the Users folder already contains your user account folders, you get an error message if trying to input the same name:

View attachment 128342

Use a temporary name, for instance Test to continue first boot routine. When Windows stops for login, choose your old account to login, for instance in my case I chose here Kari and not the account Test which I just created:

View attachment 128343

When finally in Windows desktop, go to User Accounts and remove the unnecessary Test account. That account has yet no folders to remove because Windows does not create user folders when user account is created; the user folders are only created when user logs in first time.

That's it. Works without any problems whatsoever.

Kari

Hi,

So I already have Windows 7 installed on my computer and would rather not do a complete reinstall to move my Users folder.

I have not read the thread fully yet but I was wondering, from those who have done it, if following the above steps (along with following the PDF guide) works 100% and doesn't result in any unforseen issues?

Thanks.
 

My Computer

OS
Windows 7 Professional x64
I don't know how it's been for others, but I've done this several times without issues on rigs with old installations.

The error mentioned at the very end of the tutorial occurs more often when using this method than when used on a fresh install. Check first the end of the last page to see how to stop that disturbing service before running script.

Remember that the new location is only set when Windows is finally booted normally, so after running the script and returning to Audit Mode you don't see new Users folder on the drive where you moved it.

Kari
 

My Computer

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
Help Please - Sysprep xml file failure

I'm using a Win7 Enterprise iso burned from MS Volume Licensing download which already has SP1 integrated. Windows 7 installs fine, and I can get into audit mode.
When I run the script, PerfLogs, Program Files, Program Files (x86),Users, and Windows directories are created on my E drive.
All these files still exist on the C drive. Any thoughts??
 

My Computer

Computer Manufacturer/Model Number
Custom Box
OS
Windows 7 Ultimate x64
CPU
i7 980X
Motherboard
Asus P6T7WS Supercomputer
Memory
12Gb Corsair Dominator GT DDR3 PC3-16000 (2000MHz)
Graphics Card(s)
NvidiaQuadroFX3800, Nvidia PNY VCQ295NVS-X16-DVI-PB Quadro
Sound Card
M-Audio
Monitor(s) Displays
3 Samsung SyncMaster305T, 1 Nec Multisync 309WQXi, 2 275T+
Hard Drives
2 Crucial Real SSD 256Gb, 2Corsair 128GbSSD, 4 Hitachi SAS 1T 6/s Seagate Constellation SAS,plus others
PSU
Corsair HX1000
Case
Lian-Li 2100+
Cooling
Swiftech Liquid Cooling
Hello RCWin7 4M, welcome to the Seven Forums.

First, Microsoft does not recommend moving other than Users and ProgramData. Both Program Files and Program Files (x86), as well as Windows and PerfLogs should stay on system drive.

When using this method to relocate Users and / or ProgramData, the original ones still remain on C: but they are no longer used. This post might give you more insight.

Kari
 

My Computer

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
Move users directories problem solved

Kari - My point in the original post was that I copy/pasted your xml script, made appropriate changes and when the script ran, the Perf & Program files folders were also moved to the E drive as well as some windows folders. I did not check to see if WPMNetwork was running so maybe that was the problem.
When I did a second clean install, your program worked flawlessly.
Thanks for responding, and for writing such a great script. Almost all advanced users want to get these folders off C and it seems that our friends at Microsoft have purposely made this more difficult with each new version. Thanks again
 

My Computer

Computer Manufacturer/Model Number
Custom Box
OS
Windows 7 Ultimate x64
CPU
i7 980X
Motherboard
Asus P6T7WS Supercomputer
Memory
12Gb Corsair Dominator GT DDR3 PC3-16000 (2000MHz)
Graphics Card(s)
NvidiaQuadroFX3800, Nvidia PNY VCQ295NVS-X16-DVI-PB Quadro
Sound Card
M-Audio
Monitor(s) Displays
3 Samsung SyncMaster305T, 1 Nec Multisync 309WQXi, 2 275T+
Hard Drives
2 Crucial Real SSD 256Gb, 2Corsair 128GbSSD, 4 Hitachi SAS 1T 6/s Seagate Constellation SAS,plus others
PSU
Corsair HX1000
Case
Lian-Li 2100+
Cooling
Swiftech Liquid Cooling
From what I have been reading here it sounds like a good tutorial, my question is if moving the user profiles have any drawbacks to a SSD such as shortening the lifespan?
 

My Computer

OS
Windows 7 Home Premium x64
From what I have been reading here it sounds like a good tutorial, my question is if moving the user profiles have any drawbacks to a SSD such as shortening the lifespan?
Absolutely none whatsoever. Theoretically even the opposite; less work = better durability through less disk operations.

Kari
 

My Computer

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
Hi Kari,

This is working well so far for me on my installation. Just on the reboot after running the script. Currently on "Setup is checking video performance" and have been for some time...When does the data actually move itself from on drive to the other?

This setup bit has taken FOREVER and the script only took a few mins.

I had to reboot my PC, and it has now broken my Windows. I didn't do anything wrong, it was just taking 40 mins on the video performance detection.
 
Last edited by a moderator:

My Computer

Computer Manufacturer/Model Number
Custom Built
OS
Windows 7 Professional x64
CPU
Intel Core i7-920 @ 4GHz
Motherboard
Gigabyte GA-EX58-UD5
Memory
Corsair XMS3 6GB @ 1600MHz
Graphics Card(s)
Zotac Nvidia GTX 480
Monitor(s) Displays
Iiyama ProLite E2607WS 26"/Samsung SM226BW 22"
Screen Resolution
1920 x 1200/1680 x 1050
Hard Drives
Intel 320 Series 160GB SSD
PSU
Corsair HX1000
Case
CoolerMaster ATCS 840
Keyboard
Logitech G15
Mouse
Razer Lachesis
Internet Speed
50Mb/s download - 1.5 Mb/s upload
Just found out: I'm an IDIOT! The data was copying itself during that video performance bit. And now I've screwed my install. Any way to fix this mess I've created?

Update: I have decided to use a Live Ubuntu USB to copy all the data over to the new drive (half of it was already done). Then I will reinstall Windows to my system drive. I only need it until tomorrow, so not a huge problem. Will just install the applications I actually need.

I think it might be a good idea (for the idiots out there like me) to mention that the files copy over in that Windows setup phase (initial setup, checking video performance etc etc) in the tutorial. I should have known it was doing something, I was just being impatient :(
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Custom Built
OS
Windows 7 Professional x64
CPU
Intel Core i7-920 @ 4GHz
Motherboard
Gigabyte GA-EX58-UD5
Memory
Corsair XMS3 6GB @ 1600MHz
Graphics Card(s)
Zotac Nvidia GTX 480
Monitor(s) Displays
Iiyama ProLite E2607WS 26"/Samsung SM226BW 22"
Screen Resolution
1920 x 1200/1680 x 1050
Hard Drives
Intel 320 Series 160GB SSD
PSU
Corsair HX1000
Case
CoolerMaster ATCS 840
Keyboard
Logitech G15
Mouse
Razer Lachesis
Internet Speed
50Mb/s download - 1.5 Mb/s upload
Just found out: I'm an IDIOT! The data was copying itself during that video performance bit. And now I've screwed my install. Any way to fix this mess I've created?
Please don't shoot the messenger now ;) : Re-install might be the best alternative now. If you decide to do so, do not forget to backup your data first.

Kari
 

My Computer

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
Just found out: I'm an IDIOT! The data was copying itself during that video performance bit. And now I've screwed my install. Any way to fix this mess I've created?
Please don't shoot the messenger now ;) : Re-install might be the best alternative now. If you decide to do so, do not forget to backup your data first.

Kari

Not your fault at all mate don't worry! I was being impatient, and a massive idiot! Lol.

Like I posted above, using an Ubuntu Live USB to copy all the files over, and then going to reinstall :)

Not a huge issue, SSD is arriving tomorrow anyway, so will need to reinstall then too ;)
 

My Computer

Computer Manufacturer/Model Number
Custom Built
OS
Windows 7 Professional x64
CPU
Intel Core i7-920 @ 4GHz
Motherboard
Gigabyte GA-EX58-UD5
Memory
Corsair XMS3 6GB @ 1600MHz
Graphics Card(s)
Zotac Nvidia GTX 480
Monitor(s) Displays
Iiyama ProLite E2607WS 26"/Samsung SM226BW 22"
Screen Resolution
1920 x 1200/1680 x 1050
Hard Drives
Intel 320 Series 160GB SSD
PSU
Corsair HX1000
Case
CoolerMaster ATCS 840
Keyboard
Logitech G15
Mouse
Razer Lachesis
Internet Speed
50Mb/s download - 1.5 Mb/s upload
When re-installing, follow the tutorial to relocate Users already before you create the user accounts. Finalize installation, and then restore your data from backup.

Good luck!

Kari
 

My Computer

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
Back
Top