Link to home
Start Free TrialLog in
Avatar of Armitage318
Armitage318

asked on

Change user profile path (domain user)

Hi, I need to migrate several user profile with very old OSes (XP, Windows 7...).
I succesfully used Profwiz on a couple of XP machines.
I can't use same tool on Windows 7 because on some workstation there is no SP 1 (it is required).
I wondering if I can simply edit the proper registry key to change path of  users, like this:

https://support.microsoft.com/en-us/help/2454362/renaming-a-user-account-does-not-automatically-change-the-profile-path

I don't know if Profwiz does more stuff other than change registry path.

Thank you !
Avatar of Alex
Alex
Flag of United Kingdom of Great Britain and Northern Ireland image

Oh god no.... please don't use that crap or do any reg hacks, it's filthy for a reason.

Right,

Firstly your better option is to temporarily give them folder redirections or at the very least use a roaming profile (Not ideal).

Get them to log onto their regular machine they use and log off, this'll upload the profile to the server location

Then get them to log onto the new machine which will then pull down all the folders and files into the new profile.

Remove the group policy when everyone is updated.

Thanks
Alex
Avatar of Armitage318
Armitage318

ASKER

Hi Alex, what do you mean exactly with folder redirection?
Actually, it is same machine (users need to leave domain and join again same domain on a new controller, because DC failed few days ago.. just one DC, no replica at all!)

If you want please see my previous (solved) question:

https://www.experts-exchange.com/questions/29157684/Reinstall-controller-with-same-AD-domain-name.html


Thank you
EDIT:
And...I suddenly realized you're not talking about renaming or moving to a new place on the same machine.  You're talking about moving to a new machine and even a new OS.  lol, well, I've never tried that, and I wouldn't be surprised at all if there are problems, but perhaps the things I've said below might still be helpful in this case.  I wish you luck.

EDIT2:
Sorry, I'm all over the place here.  It sounds like it WILL be the same machine, possibly even with the same user account? Note that if it's a new domain, even with the same name as before, it's a different user account.  Either way, this should all work great.

ORIGINAL COMMENT:
I've done this a few times.  In addition to changing the path to the user profile, you need to change the path to, well, everything, in the user's registry hive.  Normal regedit makes this tedious, so I use Advanced Regedit (regedt33.exe) for its search and replace functionality.

For the search & replace part of the instructions below, let's assume the following
Old user profile path = C:\Users\john
New user profile path = C:\Users\dave

  1. Right-click regedt33.exe and Run as administrator
  2. Expand and select HKLM
  3. Click Registry >> Load Hive
  4. Click the button next to "File name" to browse
  5. Find your original user profile folder under C:\Users\<username>.  Whether it's changed yet or not is irrelevant, but you must not currently be logged in as the user in question.
  6. Select ntuser.dat.
  7. Give it a subkey name (next to where it says "Subkey to: HKLM").  Let's call it ntuser.  Click OK.
  8. Expand and highlight ntuser (now under HKLM).
  9. Press Ctrl-H to search & replace.
  10. Search = C:\Users\john
  11. Replace = C:\Users\dave
  12. Make sure "In value names", "In value data", and "In key names" are all checked.
  13. Click the button next to "In value data" and check everything in there. Click OK.
  14. "Start key" should be HKLM\ntuser.  Put the same value in "End key".
  15. Click "Go" and click "All".  Click OK on the confirmation that tells you how many items were renamed.
  16. Highlight ntuser on the left.
  17. Click Registry >> Unload Hive.
  18. Close Advanced Registry Editor.

If this is a new user account that is being assigned to the profile we just moved/renamed, you must also address permissions.
If it's the same user account with just a different path to the profile, this part isn't needed.

  1. Open regedit (the normal one this time).
  2. Expand HKEY_LOCAL_MACHINE.
  3. Click File >> Load Hive; choose the same ntuser.dat file you chose with regedt33.  Call it ntuser.
  4. Right-click ntuser and go to permissions.
  5. Add the user who will be using this profile with "Full Control" permissions.
  6. Click Advanced, put a check in "Replace all child object permissions...etc" and click OK. Click Yes.
  7. Ignore a message about some things not being set (never caused me an issue).
  8. Click OK.
  9. Highlight ntuser, click File >> Unload Hive, and close regedit.
  10. Browse to the user folder (assumed here to be C:\Users\dave).
  11. Right-click the folder >> Properties >> Security tab
  12. Click Edit, add the user, check "Full control", click OK, and click OK again.
  13. Once it's done, right-click dave again >> Properties >> Advanced "Replace all child object permission...etc", click OK

Again, if errors come up about a few things not being applied, don't worry about it.  However, if it says something about nothing being applied and access denied, we may need to take ownership of the folder with the account you're using to do this surgery.  In that case, I would advise trying to login as the user and see how things look.  If there are problems, it's likely due to lack of permissions on the user folder.

This page provides a great little registry hack that lets you install/uninstall a context menu item to take ownership of folders.
https://www.raymond.cc/blog/download/did/3557

Once you have ownership, you should be able to try again on adding full control permissions for the new user account.
Hi Nolan, sorry, just one doubt in step 5: according to your example, should I select "c:\users\john" or "c:\users"dave"?
I think my problem is that,  in my case, "user" is not changed, because I am migrating profile between SAME user, but joined AGAIN to SAME Active Directory domain.
For example: "original" profile path is

c:\users\dave

After left domain, and joined domain again, new profile path is:

c:\users\dave.DOMAIN

My goal is to move data, settings, and so on from c:\users\dave to c:\users\dave.DOMAIN

thank you very much
ASKER CERTIFIED SOLUTION
Avatar of Nolan Mason
Nolan Mason
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial