How to set home directory in Win10

16

6

I currently do not have a home directory on my laptop, and all users are under C:\Users. I want a folder, C:\Users\username, to become C:\home\username. On Linux I know this is mkhomedir_helper, but I am unfamiliar with how to implement this on Windows 10.

SJ14

Posted 2017-03-20T02:13:30.167

Reputation: 161

Answers

16

Find your SID

Run the following command from the command prompt:

wmic useraccount where name="USER" get sid

Remember to replace USER with your username. Write this down as you will need it later.

(credit)

Move your User Profile

Using an administrator account other than the one you want to move, copy the folder C:\Users\Username to C:\home\username.

Open Regedit to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

In the left pane under the Profilelist key, select the key that matches the SID your got before. In the right pane, right click on ProfileImagePath, and click on Modify. Enter the full path to where you copied your User Profile to (i.e. C:\home\username.

(credit)

Ploni

Posted 2017-03-20T02:13:30.167

Reputation: 560

Works fine, but may break some some applications. These can't find some of their old data anymore, due to hardcoded paths. E.g. MS Outlook 2016 and MiKTeX. I would recommand to avoid moving the user profile if the user already used the account. – someonr – 2020-02-04T12:27:05.883

0

Plonis answer is good but instead of going to the registry:

  • start menu > type "users" > select "Edit local users or groups" (or lusrmgr.msc)
  • double click Users
  • double click the user you want to change
  • Profile tab > Home folder > Local path > enter the new path

user829755

Posted 2017-03-20T02:13:30.167

Reputation: 387

1

Um, no? https://imgur.com/uDRhfKi

– gman – 2019-02-28T05:57:33.023

0

(I'd put this as a comment rather than a new answer but I don't have enough reputation to do so)

I don't think user829755's answer does the same thing. Altering the home folder this way using local users and groups does something completely different: it changes what the environment variables HOMEDRIVE and HOMEPATH are set to. But I think you'd be hard-pressed to find anything that uses these. If you start a CMD prompt, it still starts off set to the home folder from ProfileImagePath. If you start exploring the file system, you'll find that Libraries->Documents->My Documents still points to the Documents/My Documents folder under the ProfileImagePath, etc.

The entry in ProfileImagePath is the folder that must contain the NTUSER.DAT file for the SID that was in the registry path leading to ProfileImagePath. This is just one of the conditions in the sniff test that occurs when the user logs in. If the sniff test fails (for this and any of several other reasons) a new folder under \users will be created with a new NTUSER.DAT file.

Kevin Martin

Posted 2017-03-20T02:13:30.167

Reputation: 13