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: User Profiles - Create and Move During Windows 7 Installation

10 Jan 2014   #740
Kari

Microsoft Community Contributor Award Recipient

 

Seems to be OK, both folder location variables point to K: drive.
Code:
<FolderLocations> 
                <ProfilesDirectory>K:\Users</ProfilesDirectory> 
                <ProgramData>K:\ProgramData</ProgramData> 
            </FolderLocations>
Strange. It is not possible that sysprep moves one of the folders but not the other, as both are moved to same drive. This is normally only possible outcome when A) <ProfilesDirectory> and <ProgramData> variables point to different drives and one of those drives is not present when sysprepped or B) user has at some point relocated one of the folders back to C:.


My System SpecsSystem Spec
.
10 Jan 2014   #741
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

Thanks for looking, I think I'll be doing a fresh install soon, new motherboard, or not.
I did make a Macrium image of both drives and restored them, but I don't think that would have changed it. But as we agree, no harm and it works fine.

Isn't it time for a Laphroaig Triple Wood?
My System SpecsSystem Spec
12 Jan 2014   #742
paveway7

Win 7 64 bit Ultimate
 
 

Kari,

Thanks for the forum posting with the user profile change for win 7. I am not a great tech person but was able to follow your instructions and successfully reinstalled win 7 a while back.

I have purchased a larger, faster data hard drive and would like to use it to replace the current separate hard drive I am using for data only. I tried cloning my old data drive and simply replacing the new cloned drive, but it did not work and have spent the afternoon restoring the original setup. I was able to do so after a few hours of work using system restore.

Let's assume I have C: as the opp system on SSD and D: old data drive and K: new cloned data drive to replace or be main data drive. What are the steps to make the switch? I do not think is simply remapping the drive letter Disk Management.

Regards
My System SpecsSystem Spec
12 Jan 2014   #743
Kari

Microsoft Community Contributor Award Recipient

 

Hi Paveway7, welcome to the Seven Forums.

I'm a bit preoccupied just now. The answer will be quite long, I need an hour or two before I have time to compose it. Come back later tonight .

Kari
My System SpecsSystem Spec
.

12 Jan 2014   #744
paveway7

Win 7 64 bit Ultimate
 
 

Thanks. Do not expect you to dedicate your Sunday to this frankly. But was hoping is a quick win.... oh well.

That said, a follow up article on how to maintain, backup, etc this arrangement (split drives for op and data) in case of a hdd or ssd failure, etc I think would be good. I found lots of chatter about setting it up, but nothing on maintaining and enhancing the setup.
My System SpecsSystem Spec
12 Jan 2014   #745
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

Please wait for Kari's reply. I have my w7 installed wit this method on two machines. Instead of cloning I used Macrium to image each drive and found I needed to restore both images for it to work again. You still should wait for Kari. This was for info.
Imaging with free Macrium

I keep the images files on two separate external drives.
My System SpecsSystem Spec
12 Jan 2014   #746
Kari

Microsoft Community Contributor Award Recipient

 

Quote   Quote: Originally Posted by paveway7 View Post
Let's assume I have C: as the opp system on SSD and D: old data drive and K: new cloned data drive to replace or be main data drive. What are the steps to make the switch? I do not think is simply remapping the drive letter Disk Management.
OK, a bit about possible scenarios for you. Basically there are a lot of alternatives to achieve what you want to but I would use one of these three methods:
  1. Clean install
    • Remove the old data disk
    • Reinstall Windows to SSD
    • Shut down after reinstall, attach the new data drive
    • Relocate Users and ProgramData normally
    • Create all user accounts you need to
    • Attach the old data drive either directly or using an USB enclosure, copy user data to respective user folders on new data (user profiles) drive
    -- OR --
  2. Move folders back to C:, replace data disk, move to new data disk
    • Backup your user data from the old data drive, make Users folder as small as possible by moving as much as possible to a temporary storage (docs, pics, media etc.)
    • Move Users and ProgramData back to C: (SSD) by running sysprep with an edited answer file. This post although being a response to a different issue tells how, see Option 2 of said post. The more data there is to move the longer the sysprep process will take
    • Shut down, replace the old data disk with the new one
    • Relocate the Users and ProgramData to your new data disk using sysprep, edit answer file (<FolderLocations> tags) accordingly
    • Copy the user data from temporary storage to new data disk to respective folders
    -- OR --
  3. Relocating directly to new data disk (if your case has slots for all disks (SSD, old HDD, new HDD))
    • Attach the new disk, assign it a letter. Notice that you are not able to use the letter previously reserved by old data drive)
    • Run sysprep with an edited answer file, changing the <FolderLocations> as needed to point to the new data partition
Kari
My System SpecsSystem Spec
12 Jan 2014   #747
paveway7

Win 7 64 bit Ultimate
 
 

Kari, thanks for the quick response. I think option 3 is what I would try first as I have the room in the PC. Follow on question. Assume my mappings before were C: ssd/op sys D: old data K: new intended data drive. Can I in Disk Manager rename D: to E: (as an example), then rename K: to D:. I then use the sysprep file again for D: (as when originally set up and now the remapped new data drive. Once set up, I copy the files from E: to D: (new)?
My System SpecsSystem Spec
12 Jan 2014   #748
Kari

Microsoft Community Contributor Award Recipient

 

Quote   Quote: Originally Posted by paveway7 View Post
Kari, thanks for the quick response. I think option 3 is what I would try first as I have the room in the PC. Follow on question. Assume my mappings before were C: ssd/op sys D: old data K: new intended data drive. Can I in Disk Manager rename D: to E: (as an example), then rename K: to D:. I then use the sysprep file again for D: (as when originally set up and now the remapped new data drive. Once set up, I copy the files from E: to D: (new)?
No!

The thing is, you can never change the drive letter of a drive which contains system files and folders. Some smart geek may join this discussion and tell you of course you can, but it includes so much registry editing and is almost certainly going to fail that I will not even go deeper to that, nor will I assist in any way in doing so.

Why this method to relocate some system folders with sysprep and an unattended answer file works so well is because it changes the values of some internal Windows environment variables, in this case the ProfilesDirectory and PrograData variable values.

You can see how Windows environment variables work by opening Windows Explorer and testing some of them by typing the variable in addressbar between the %-signs and hitting enter to open a certain folder. Try these:
  • Type %appdata% to open the roaming appdata folder on your user profile folder
  • Type %localappdata% to open the local appdata folder on your user profile folder
  • Type %userprofile% to open your user profile folder
  • Type %public% to open the public user folder
  • Type %allusersprofile% to open the ProgramData folder
For instance the last one in above list, the %allusersprofile% tells Windows the user wants to go to the ProgramData folder. The user does not need to know on which drive the said folder is located. He simply gives the variable...:
User Profiles - Create and Move During Windows 7 Installation-2014-01-12_23h46_40.png
... and is taken to correct location:
User Profiles - Create and Move During Windows 7 Installation-2014-01-12_23h48_39.png
(Screenshots from Windows 8.1 but it works similar on Windows 7.)
This works as long as we have told Windows the exact value of each environment variable. If you have sysprepped your system telling Windows that the value of variable <ProgramData> = D:\ProgramData and you then change the drive letter, Windows now has a variable pointing to a non-existing value (folder) and can no longer find it, causing Windows not to work anymore.

Using Disk Management to change the drive letter for a drive which contains Users and ProgramData or any other system folder will totally destroy your system beyond repair.

That being said, you eiher accept that your new data drive (user profile drive) has a new drive letter, or you select the method 2 from my previous post.

Kari


My System SpecsSystem Spec
13 Jan 2014   #749
paveway7

Win 7 64 bit Ultimate
 
 

Kari, thanks once again. I think the option 3 is the way to go for me. Basically I follow the instructions for an in place Win 7 installation in the original forum. As my User files are currently on D: drive and am looking to map to K:, I do not see where in the XML script I tell Windows that the existing User files I want to move are on D:. I see where I switch D: to K: in the script. Any suggestion?
My System SpecsSystem Spec
Comment

 User Profiles - Create and Move During Windows 7 Installation




Tutorial Tools Search this Tutorial
Search this Tutorial:

Advanced Search




Similar help and support threads
Windows 7 Tutorial Category
Help with User Profiles in Windows Server 2008
Hey guys and ladies. So i have scoured the forums looking for answers to my problem and have yet to get a definitive fix. It may just be me though lol. So I am an IT technician for some schools and i have just implemented a new server. It is running Windows Server 2008. My client machines are...
General Discussion
Windows 7 User profiles issue - Shows logging off after entering corru
This issue has become specific as fixing one problem led to the other: 1) I deleted ntuser.* files while working in linux as they had ugly looking file extensions and I thought they are temporary files. 2) I started getting the message "The Group Policy Client service failed the logon....
Installation & Setup
cannot create new user profiles
Win 7 Home Premium. Optiplex 755. I have a working user profile with administartive rights which works fine. I also have a working guest user. However when I try to create a new user, standard or administator, the new user is shown in "mange users" but cannot be logged into. This happens in safe...
General Discussion
Can't move user profiles
Guys ... opening this as separate thread as previous one took a direction of its own. Scenario As per Tutorial moved my profiles off the C:\ http://www.sevenforums.com/tutorials/87555-user-profile-change-default-location.html In order to use Windows Repair/Upgrade Disk I need to move them...
Installation & Setup
How do I move my user profiles back to C:\user
On advice here to keep OS disk space small, followed the tutorial http://www.sevenforums.com/tutorials/87555-user-profile-change-default-location.html and moved my user profile from C:\user\name to E:\user\name The problem is Windows upgrade (need to run for repair) will not accept profiles...
Installation & Setup
New to Win7 move User profiles or use Libraries?
I have just upgraded from Vista where we had two user account profiles on the D partition, as I recall, Vista prompted me to set it up this way initially. I got used to using this method, as my single hdd is divided into two partitions, C for the OS and D for Data. I did a new clean install of...
General Discussion


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 11:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App