What will be the best way be to restore D:\Users back to C:\Users after move? Computer is running on Vista OS and I think to get Users folder on another partition was used method described here https://serverfault.com/questions/8187/whats-the-best-way-to-move-c-users-to-d-users-under-vista-w7

robocopy C:\Users D:\Users /mir /xj /copyall
mklink C:\Users D:\Users /j

I need to get User folder back on C due failure upgrade to Windows 7 (doesn't recognize that User folder is on D:)

Not sure if steps below are sufficient enough to accomplish that task:

rmdir C:\Users                      #remove junction link
robocopy D:\Users C:\Users /e /xj /copyall
rmdir /S /Q D:\Users
mklink D:\Users C:\Users /j         #to be safe if something will try to save to D:\Users

Last year I went the exact same route you did. IIRC, the solution you wrote was roughly what I ended up using, so I think it's okay.

For safety, though, don't run the third command (rmdir /S /Q D:\Users) just yet.

Before obliterating D:\Users, it's better just to rename it to something else and see if something breaks during boot. If by chance things get nasty, renaming it back will guarantee the previous state, which you won't be able to do if you rmdir /s it beforehand.

Also, instead of the last step (mklink D:\Users C:\Users /j), I'd rather use a batch search-and-replace on the registry to change all occurences of D:\Users back to C:\Users (and maybe let outstanding applications fail -- this is up to you, I just didn't want another junction). I vaguely remember having to be a bit creative on this part, because sometimes the path was stored like D/Users or D:\\Users. Maybe I used regex to accomplish that. Use a good registry tool (I used RegEditX).

So, summing up, I would recommend:

rmdir C:\Users                      #remove junction link
robocopy D:\Users C:\Users /e /xj /copyall
rename D:\Users D:\UsersOld
# try booting
# search and replace registry
# use system for a couple of weeks
rmdir /S /Q D:\Users

Small note: it's not the case that Windows "doesn't recognize" that the Users folder is in D:. Windows knows you moved it around and replaced the original path with a junction, and deliberately prevents updating (this is conspicuous in the logs).

  • With the robocopy is better to use \e or \mir option and then skip two steps and use your solution to replace in the registry? – JackTheKnife Oct 2 '15 at 14:41
  • Your comment is ambiguous, could you please rephrase? I don't understand if you: a) want to know if it's better to use /e or /mir or b) want to confirm a new plan (robocopy with either switch then skip two steps then replace registry entries). – André Chalella Oct 2 '15 at 14:53
  • Option a) - which one is better to go for? – JackTheKnife Oct 2 '15 at 15:33
  • 1
    They should be equivalent, since the destination (C:\Users) won't exist before the command. Please make sure you don't misspell the forward slash (/) like you did in the comment (you wrote backslashes). Also, see the edit I'm about to make. – André Chalella Oct 2 '15 at 15:36
  • I have ended up with adding /zb trigger to the robocopy line as I had multiple Access Denied errors during copying files (something wrong with ACL). System booted w/o any issues but didn't checked functionality yet. – JackTheKnife Oct 5 '15 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.