5
1
I want to relocate my user directory C:\Users\Edwin
to a mapped network drive E: (i.e. mapped from a network share \\\\192.168.22.9\share
).
The difficult part is in relocating the user directory itself. I found 2 possible solutions, both of which were not applicable to me due to my use of a network drive.
Moving
C:\Users\Edwin" to "E:\Users\Edwin
and then use junction symlink (mklink -J
) to link back toC:\Users\Edwin
.This doesn't work for me because i can't create a junction symlink from a directory on a non-local drive.
Changing the value of registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory
from%SystemDrive%\Users
toE:\Users
BEFORE creating the "Edwin" user.Thereafter, when "Edwin" user first logs in, the profile will be in
E:\Users\Edwin
.
The problem with this is that I run into a chicken-and-egg problem.
On first login as user "Edwin" the profile will be created in E:
. However, at the moment I first login, the mapped network drive E:
isn't there.
I've tried the following to no avail:
Create a persistent mapped drive as Administrator. Didn't work. The mapped drive is only visible to the Administrator user.
Create a persistent mapped drive using system rights (using
PsExec -s
). Didn't work. The mapped drive isn't "owned" by anyone, not even the current Administrator user.Create a persistent mapped drive using the newly created Edwin user, without logging in as Edwin yet (using
PsExec
again). Didn't work. While is possible to create a mapped drive as a different user, once i tried to do it persistently (/persistent:yes
), i get aAccess is Denied
error.
Any idea how this can be done? Or whether it even can be done at all?
How about redirecting to the UNC path instead? – afrazier – 2010-12-15T01:04:54.273
This is impossible. Windows constantly writes to the user profile, so performance would slow to a crawl. – kinokijuf – 2013-02-07T13:00:55.937
Also, the kernel holds a lock on
%USERPROFILE%\NTUSER.DAT
(the registry) and this happens on a lower level than UNC. – kinokijuf – 2013-02-07T13:02:28.260