I have a windows 7 SOE for my school which involves two partitions - C: for system (windows) and programs, and D: for Data. The "Users" folder is kept on D:. All users are in Active Directory.
I would like to be able to re-image drive C: when there is a problem, and have the user be able to pick up where they left off with the data on drive D:. However, when I tried re-imaging just drive C:, when I logged in for the first time, it created a new user folder in drive D: - I still had access to the old one, but it wasn't the default location for my files (the old one was named 'myusername' while the newly created one was named 'myusername.DOMAIN')
Any ideas how I can 're-link' the account to the pre-existing user drive? Registry entry? Sysprep command?
The logic that you're seeing is a designed behavior on Microsoft's part. The
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVerison\ProfileList
subkey for the user's SID doesn't exist on the freshly re-imaged machine and when Windows "sees" the existing "D:\Users\username" folder it assumes this folder contains existing data and creates a new folder instead.To my knowledge the specific details of the "...\ProfileList" subkeys are not publicly documented. Conceivably you could write a Startup Script to "pre-create" these entries based on the contents of the "D:\Users..." folder but, frankly, I think you'll be fighting a losing battle to get it working right. This may be your only option.
You can just logon as the user, allow the new folder to be created, logoff, logon temporarily as another user to modify the "...\ProfileList" subkey for the initial user, and then clean up the then-unused "...DOMAIN" user profile folder that Windows created on the initial logon. It's a tedious and manual process but it would work.
Storing your users' data and profiles on server computers would get around this whole mess but I assume you're not doing that already for some reason.
Have you thought about leveraging the User State Migration Tool ("USMT")? It's designed for this type of scenario if I'm reading the OP right.
This will bring over profile data and bind it specifically to the AD user within the machines registry so when that user logs in, he/she will use the same profile.
Is this what you're asking?