PDA

View Full Version : Move User directory to another place



Ostap
24-04-2021, 03:17
Hi

As noted before (https://42amsterdam.net/samforum/showthread.php?t=2435)
Here I'll explain how to move your profile directory to another disk

Let me start from WHY ? - Why one should move it ?
There could be many reasons - but mainly - to preserve your data after restore !

Windows user account directory might be ..or get huge
It contains data for all programs you've installed
It contains settings for all programs you've installed
and it will keep track on what you are doing (hold on ...:)
...not to spy on you but to simplify your work

Although in last few years - spying became a trend among ALL major companies and they do not even sorry for that.
but that's not the issue we're going to solve here

Before we start:

Requirements:
besides your C: - you'll need a secondary disk where you going to move your account
It could be another partition or another disk ...whatever !!
In this tutorial i'm assuming we have C: - for windows and D: - secondary partition on the same disk



If you have not yet done that - enable few settings in your explorer :

Enable to show hidden files
Enable to show system files (and yes click OK when windows ask you - are you sure ?)
to do that:

Open "Control Panel"
Find "Folder Options" => open it
you'll get this dialog:

7223

this one is from Win7 ..and might differ from win10
switch to "View" and check required options:

7224

once you disable the "hide protected operating system files" - you'll get a warning
click yes...

7225



and then "Apply"

aand boom --- suddenly - few more files will appear on your desktop:

7226

Just go ahead and delete them !!! don't be scared :)
(these are just standard windows files - always present - and nothing to worry about)


Now navigate to C/Users/....: to your account directory

7227

there is a bunch of items inside - but check if you can see "AppData" directory previous hidden from you
if you can see it - we are set and ready for next step

Windows 7 - allows to make symbolic links ..yes...but its cumbersome and unhandy...so
download the program that will make it more easy:

https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html

It will simplify making links across disks !!! (yes in windows its a thing - if linux user asks)
....
Install it ..



Ok ..once all is done - we are ready to move on
Lets move YOUR account !!!



Normal user account - located at: "C:/Users"
and they look like this:

7228

and you cannot just move/copy it :) - there are files system uses at the moment
so ..
Lets create a temporary user:

Click on "Start" button and in "Run" field type compmgmt.msc
you should get this:

7229

open "Local Users and Groups"
select "Users"
you'll get this:

7230

Right click into empty space - and "New User"

7231

Create one - name it whatever - its an temporary user
and set few settings accordingly :

7232

Click "Create"
Click "Close"



Now - we'll need to give new user admin rights:
while in the same whidow - double click on new user "

7244

switch to "Member Of" tab:

7233

and click "Add"
you'll get this:

7234

click "Advanced"

7235

Click "Find now"

7236

first line - is "Addministrators" - double click on it to select
you should see it being selected:

7237

we are done !!!
Click OK - you should get this:

7238

Click Apply (previous dialog)
and click OK to finish

------------------------------
We are done for this part
User creation is complete :)


After this you have 2 admins in your system
You and temporary user
Before we proceed - log out ...and login with new temporary user to test that all is workign
in the new temporary account - you should be able to see windows directory contents

Once all is working - reboot (allow windows to properly save everyting - and close all accounts)
After reboot - WE'LL START MOVING - SO DO NOT LOGIN INTO MAIN ACCOUNT !!!
login into temporary one

7239

and lets do this:

Open explorer
Navigate to your disk where you want to store your account (its D: in our case)
Create a directory called "==SYSTEM==" (char "=" is used to force windows always sort this directory above any other - but you are free to name it the way you like)

7245

Navigate to C:/Users/your-main-account.... and copy it to new location on D:/===SYSTEM===/
Now most interesting part - rename "C:/Users/your-main-account" to "C:/Users/_your-main-account" ...just in case something goes wrong (will be deleted afterwards)

7240

Navigate to D:/===SYSTEM===/ and right click on copied account - click on "Pick Link Source"

7246

Navigate to C:/Users/ and drop new symbolic link as "Junction"

7242

you should get this:

7243



All done - log out - and check your main account
If all works fine - and no errors - you can safely remove the "C:/Users/_your-main-account" ...

All this - is just moving the account
Whole account !!!

It will provide you with saved data when you restore your windows from capsule
but it will not provide any protection

The whole process is very complicated as it is already - so lets stop here
I will create another tutorial to create "SAVE" way of moving an account that will prohibit virus distribution
while keeping all the settings