another man's ramblings on code and tech

Manually Copying User Profiles in Windows

While working on generating Windows base boxes with Vagrant, I encountered a problem early on. I had created an account with my name by accident to install all the requisite software I wanted to bundle with the base box. This proved annoying, as I would need the exact same setup of this account for a "vagrant" user. At first I thought a simple user name change would work, but unfortunately that proved to be cosmetic at best. My home folder and login credentials were still "jflowers" after I had changed the user name to "vagrant". I ended up realizing I would need to copy the "jflowers" user profile to a new user named "vagrant". In fact, Windows includes a tool accessible through Advanced Settings which seems to allow one to copy user profiles. Unfortunately, I couldn't seem to get it to work. The "Copy Profile" button was grayed out no matter what account I logged in from or what other system settings I changed. That's when I decided to do a manual user profile copy, outlined below.

1. Create the user account you plan on copying to

If you don't already have the two accounts you want to copy from and to, you'll need to make a second with the right name. In my case, this was making a "vagrant" account.

2. Create another administrative account to work from

Its dangerous to try to perform these changes while logged into either account, so you should make a third administrative account (if you don't already have one) to work from for this.

3. Log into the account made in step 1, then log out

This is merely to make sure Windows has created and configured the user profile for the new account.

3. Log into the administrative account made in step 2

To begin working with user profiles.

4. Go to C:\Users

This is where the user profiles exist on your computer.

5. Backup anything important from the user you'll be copying to

In the case that you already had the account you wanted to copy to, this is the step where you'll want to backup any data in it before continuing. This method WILL delete all data in the second user's Libraries (Documents, Pictures, etc).

6. Copy original user

Create a copy of the folder for the User Profile you'll be moving to another account in C:\Users. Simply copy and paste it's folder in the same directory. If you get any warnings here about Windows not being able to copy files, don't worry about it. These are usually temporary and pre-generated files which Windows will recreate at start up.

7. Delete folder created for user from step 1

Delete the profile generated for the user created in step 1. Then rename the copy you made in the last step to the name of the account's folder you just deleted. Essentially here you're deleting the original folder and substituting it with the user profile you want to keep.

8. Log into account made in step 1

Now if you log out of your administrative working account and log into the account made in step 1 you should see all the icons and settings of the original account you copied. Additionally all Library items from the original account will be located in this account now.

9. Delete unnecessary users

Now for cleanup. Here you can delete the other two accounts (the original we copied and the administrative we used for work) if you want, or leave them! I deleted these accounts to remove clutter and make it clear to anyone using my base box what account they were meant to use.

And that's it! You should now have copied all settings and files from one user profile to another. While this process is tedious, its rather simple to understand. Why Windows refuses to do it in their GUI when its such a simple process is rather strange, but for now this method should do.

Date: July 31st at 12:29pm