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: Troubles moving user directory via a junction

28 Jul 2014   #1
ssickels

Windows 7 Professional, Service Pack 1; 64-bit
 
 
Troubles moving user directory via a junction

Hello,

Some time ago, I had used mkdir /J (creating a junction) to move my user directory from the C: drive to the D: drive. Now I need to move it to a P: drive, and am having trouble.

I used robocopy to copy all the files in D:\User\Steve to P:\User\Steve. Now I want to set up a junction that points from C:\User\Steve to P:\User\Steve (much as I had successfully done before, when I was able to get C:\User\Steve pointing to D:\User\Steve).

I've tried the following, which unfortunately doesn't work:

- Delete the user account Steve
- Create a link (using mkdir /J) from C:\User\Steve to P:\User\Steve
- Create user account Steve
- Unfortunately, it then creates a NEW profile at C:\User\Steve.Desktop, vs. linking the new "Steve" user name to the junction C:\User\Steve (which points to P:\User\Steve), which is what I want.

I've then tried deleting C:\User\Steve and (quickly!) renaming C:\User\Steve.Desktop to C:\User\Steve, but that doesn't work either.

Any suggestions?

Many thanks, Steve


My System SpecsSystem Spec
.
29 Jul 2014   #2
Ztruker

Windows 10 Pro X64
 
 

These are the directions I followed to do this: Move the Users Directory in Windows 7
My System SpecsSystem Spec
30 Jul 2014   #3
ssickels

Windows 7 Professional, Service Pack 1; 64-bit
 
 

Hi Ztruker -- Thanks for the link! That isn't one I've found through my Googling... I"m still stuck, though, and really hope someone can help get me pointed in the right direction. I'll try to provide more details on my situation. First, though, an apology for a "typo" in my original post: I tried creating a symbolic link via mklink, not mkdir. Anyway, here's the situation:

I believe I successfully copied my full User/Steve directory from the D: drive (which has filled up) to the P: drive, using robocopy. (Although, I wish I had seen and followed the instructions in the link you provided! I did do the copy while logged into another account, but the suggestions in the link you provided seem much better.)

I've tried a bunch of times to get things set up (with my user directory at P:\Users\Steve). But every time I try this (following the instructions in the link you provided, which I had seen elsewhere too), and log in as "Steve," it displays a "Setting up your desktop" message, and logs me in to a new account.

One thing that has caused me trouble is that, in order to invoke the command "mklink /J C:\Users\Steve P:\Users\Steve," I need to first delete (or rename) the existing C:\Users\Steve directory. However, within a second or so of my deleting (or renaming; I've tried both) the C:\Users\Steve directory, the system automagically creates a new C:\Users\Steve directory. So what I've tried is "staging" my pre-typed mklink command, and hitting "enter" on it a second or so after deleting the existing C:\Users\Steve directory (before the system can create one, which, if it does, prevents my mklink command from working). If my timing is right (about 1 second or so between the delete and the mklink command), it works. When it does work, when I click on C:\Users\Steve, it takes me to all the files I have at P:\Users\Steve. HOWEVER, when I then try logging in to my "Steve" account, it doesn't take me to P:\Users\Steve; instead, it sets up a NEW account, which is obviously not what I want.

I thought maybe the issue has to do with my computer being determined to recreate the C:\Users\Steve directory as soon as I try deleting it. So, I went in to Control Panel > System and Security > System > Advanced system settings, the Advanced tab, then Settings, and made sure that the Steve user account didn't exist. It didn't. I also went into the registry, and made sure that there was no file for "User\Steve" in the registry (in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList). There wasn't a Users\Steve directory in either location, so it seems weird to me that Windows was determined to recreate C:\Users\Steve whenever I delete it. (Presumably there's some entry in the registry that says, in effect "there must be a Users\Steve directory; if it gets deleted, recreate it!")

Anyway, I hope all these details are helpful to someone in figuring out what I need to do. It *seems* to me that I just need to follow the directions in, e.g., http://www.starkeith.net/coredump/20...another-drive/, or in the link you provided. Which is, basically, for the account for which I want to move my files ("Steve"), 1) delete (or rename) the C:\Users\Steve directory, 2) create a symbolic link from Users\Steve to it's new location (that is, the location to which I've copied Steve's files), 3) verify that the symbolic link works, then 4) log in, and all's well. I go through all these steps, but when I get to (4), it creates a *new* profile, vs. linking to the directory that the symbolic link points to.

Because I feel that I'm following the instructions on several pages on the Internet, but it's not working, I'm really stuck. Any advice will be greatly appreciated! Thanks, Steve
My System SpecsSystem Spec
.

31 Jul 2014   #4
essenbe

Windows 7 Enterprise X64/Windows 10 Enterprise X64/Windows 10 Pro X64/Linux Mint
 
 

See if either one of these will help you. If you don't move the junction, it will tell other programs where your user folders are. User Folders - Change Default Location
User Profiles - Create and Move During Windows 7 Installation
My System SpecsSystem Spec
01 Aug 2014   #5
ssickels

Windows 7 Professional, Service Pack 1; 64-bit
 
 

Thanks, Essenbe!

The first link has another link (specifically, “Option One”),”To Change Main User Profile Location,” which is what I want. (It was D:\Users\Steve, and I want it at P:\Users\Steve.) I don’t want to move individual folders in my profile; I really want to have my full profile on the P: drive.

In trying to solve my issue, I’ve (intentionally) deleted my “Steve” profile (after having copied all the contents of D:\Users\Steve to P:\Users\Steve via robocopy). (The reason I did this is so I could use the mklink command to create a link from C:\Users\Steve to P:\Users\Steve, which won’t work if there’s an existing C:\Users\Steve directory.)

Following that other link (noted above), there's a section (“Option One”) for moving existing accounts, and another (“Option Two”) for new accounts. I’m thinking that I should be able to create a new user, “Steve,” which would then be an “existing” account, so I should be able to follow the Option One instructions, to point this “existing” account to P:\Users\Steve.

The first issue I run into is not being able to create a new user “Steve.” Even with the Steve account deleted (via deleting it from the user management control panel, deleting it from the registry, and also making sure it’s deleted in the advanced system settings (all of this described in my post above), I can’t delete the directory C:\Users\Steve. Within a second or so of doing so, that directory is automatically recreated.

So one thing I tried is deleting C:\Users\Steve and then within less than a second creating the user Steve. (With the hope that new C:\Users\Steve directory would be the directory for the new user Steve.) I can do that. (And the directory C:\Users\Steve is created. Although that may just be because Windows always automatically recreates that directory.) But… Then when I log in to this new account, it says “Preparing Desktop…” and then it creates *another* Steve directory: C\Users\Steve.Desktop.

So, unfortunately, I’m not able to follow the instructions linked to from the first link you provided.

And regarding the second link, I’m not installing Win 7, so it doesn’t really seem to apply.

It seems that if I can somehow start “fresh” by:
  1. Deleting C:\Users\Steve (which I can’t do – like I said, Windows automatically recreates the directory – even when there’s no “Steve” account).
  2. Then create user Steve, with the corresponding C:\Users\Steve directory
  3. Then follow the instructions for moving its target location to P:\Users\Steve
I’m stuck on my step 1, though. Any more ideas or suggestions?

Thanks! Steve
My System SpecsSystem Spec
01 Aug 2014   #6
essenbe

Windows 7 Enterprise X64/Windows 10 Enterprise X64/Windows 10 Pro X64/Linux Mint
 
 

Not really. I think the problem lies in the installation of windows. Without moving it in audit mode during installation, Windows is programed to put the junctions in the C drive. I don't know technically how it works, but there is a hidden folder you can't move in the profile that other programs use for their data files. AppData, as far as I know, can't be moved unless it is moved during installation. I know someone who would most likely know, he wrote the tutorial on moving it during installation. If you like I can contact him and see if it can be done. He is a real expert on this. I just left kari a message. I'm sure he will stop by when he comes online.
My System SpecsSystem Spec
01 Aug 2014   #7
ssickels

Windows 7 Professional, Service Pack 1; 64-bit
 
 

Many thanks, Essenbe; appreciated!

Steve
My System SpecsSystem Spec
01 Aug 2014   #8
Kari

Microsoft Community Contributor Award Recipient

 

Quote   Quote: Originally Posted by ssickels View Post
And regarding the second link, I’m not installing Win 7, so it doesn’t really seem to apply.
You can use that method also later on for an existing Windows installation. Read first post #22 in the tutorial thread, then the tutorial itself.

Reading about what you want to, this is IMO your best shot. Remove first all links and junctions, reboot and start as told in that post #22. Do not care about the post telling it applies when installing Seven on an SSD; the instructions apply to every situation when you want to relocate the main profile folder Users on an existing Windows setup.

Do not forget to backup your personal data before starting.

Kari
My System SpecsSystem Spec
01 Aug 2014   #9
ssickels

Windows 7 Professional, Service Pack 1; 64-bit
 
 

Thanks, Kari!! I won't have access to the computer for a few days, but when I do I'll try this out and will report back.

(This is not something I ever would have figured out on my own, nor have I found anything like it via Google. Wow!)

Many thanks,
Steve
My System SpecsSystem Spec
11 Aug 2014   #10
ssickels

Windows 7 Professional, Service Pack 1; 64-bit
 
 

Hi Kari,

I'm back in town (with my computer) and am reading through your (thoughtful!) instructions. A few questions, if you don't mind. But first, some details regarding my current configuration:
  • Of all the user directories currently at C:\Users, two of them (C:\Users\Elizabeth and C:\Users\Public) are soft links to the D: drive. (The other user directories in the C:\Users folder are C:\Users\Administrator, C:\Users\Default, and the C:\Users\Steve directory that is recreated automatically whenever I try to delete it.)
  • I definitely want to have C:\Users\Steve point to P:\Users\Steve, where all my files currenty live.
  • I don't really care where the Users\Elizabeth and Users\Public data lives: it's fine where it is on the D: drive, but I'd also be fine with it on the P: drive -- and it would probably be better being at the same P: drive location where I hope to have the files for my Steve account (at P:\Users\Steve).
  • Also, I don't really care where my ProgramData directory is. I'm fine with it on my C: drive, where it currently lives.

Now, my questions:
  • I've already moved all my Users\Steve directory data to the P: drive (where I want it). (As I mentioned earlier, though, I can't get my Steve account linked to that location.) From your writeup, it sounds like the script will move any current C:\Users data to P:\Users. So it sounds like my strategy should be the following steps: 1) rename my P:\Users\Steve directory to P:\Users\SteveBak (or whatever); 2) invoke the script (modified appropriately), which will create a link from C:\Users\Steve to a NEW directory P:\Users\Steve; 3) Copy all my files from P:\Users\SteveBak to the new P:\Users\Steve. Is that right?
  • I'm guessing that the XML script won't work properly for me as is, because I already have soft links from C:\Users\Elizabeth to D:\Users\Elizabeth and from C:\Users\Public to D:\Users\Public. Would the best thing for me to do be to somehow move those profiles back to their default C: drive locations, and THEN to invoke the script? (I believe there's enough space on my C: drive to hold that data. And if not, I could store some of it elsewhere until there's room for it where ever I end up putting the \Users\Elizabeth and the \Users\Public directories.)
  • I'm fine with keeping the ProgramData directory where it currently is, on the C: drive. I'm guessing that I can just delete the following line from the XML file, to keep it from getting moved: "<ProgramData>p:\ProgramData</ProgramData>". Is that correct?

If all this is too complicated/risky, I realize that my best bet may be just to reinstall my OS, and all my programs (perhaps using the libraries function to have my documents stored on my large P: external drive). But if I can just "fix" my current setup, that would be my preference.

Once again, many thanks!

Steve
My System SpecsSystem Spec
Reply

 Troubles moving user directory via a junction




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Junction Points and User Accounts
I goofed and need some help! I set up a friends computer with a SSD for the C: drive and 2 mirrored HDDs for data on D:. I used a junction point to move the Users directory to the data drives. I now realize this was a bad idea. Now you cannot login. You get a message about the User Profile...
General Discussion
Invalid junction after moving "My Documents"?
A number of months ago I followed the "standard" procedure (using the Location property tab) for moving my special folders out of c:\users\xxx to new locations under d:\xxx, where d: is a separate partition on the same hard drive as c:. As far as I can remember, this generally worked, though...
General Discussion
Moving directory tree doesn't delete folders?
I've been using Windows 7 for quite some time now (though admittedly I'm only just getting around to understanding the whole Libraries thing - I always keep my stuff on a separate HD from my OS/programs, and have only recently realized that Libraries are not constrained the way the XP My Documents...
General Discussion
Padlock symbol on user name in User directory
I am using Windows Home Premium 64 bit SP1. My user directory under c:/...Users shows a padlock symbol on the folder for user "kevin". I believe that this is the reason this directory will not back up to my cloud drive provider. What does the padlock mean, and how do I remove it?
Software
Directory junction/symbolic link not working
Recently I had to re-install Windows, but beforehand I had setup a directory junction for my Google Chrome installation. I did this because my boot drive is an SSD and I wanted to limit some of the writes to it because of cookies, etc. So I setup a directory junction from my C drive (ssd) to my...
General Discussion
"Default User" junction point folder issue
Hi I was wondering, and I should've asked here earlier, will the repair install re-create the "Public" and "Default" folders (which are in my "Users" folder) after I've deleted them? How about any junction for those two folders? I know I had one for "Default". Thanks.
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 13:55.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App