Skip to content

Instantly share code, notes, and snippets.

@silopolis
Last active March 7, 2021 13:50
Show Gist options
  • Save silopolis/3f3db09d44454cde551e16b62829b0a8 to your computer and use it in GitHub Desktop.
Save silopolis/3f3db09d44454cde551e16b62829b0a8 to your computer and use it in GitHub Desktop.
Setup instructions and commands for Windows 10 Laptop or Workstation

Open elevated command prompt

  • Win+R
  • cmd.exe
  • Ctrl+Shift+Return

Enable Admin

net user Administrator /active:yes

Set Administrator password

net user Administrator *

Rename user

wmic useraccount where name='<OLD_USER_NAME>' rename '<NEW_USER_NAME>'

Rename user's profile directory

  • Log on to another administrator account
  • Rename directory
  • Run regedit
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\
  • Find the relevant ProfileImagePath key in the user accounts SID folders and change value to the new path
  • Log out of Administrator account
  • Log on to user account

Move User Profiles directory

  • Log on to Administrator account

  • Copy User profiles directory to new location, optionnaly renaming it (ignore locked temporary files)

    cd c:robocopy /copyall [/mir|/E] /xj Users <NEW_DRIVE_LETTER>:Users/xd WindowsApps /xd OneDrive

  • Method A: Updating registry values * Run regedit * Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    • Adjust values of the Default, ProfilesDirectory and Public keys to the new location
    • Adjust the ProfileImagePath keys in the users accounts SID folders and change value to the new path
    • Remove old folder after verifying everything is working

    rmdir /S /Q C:Users

  • Method B: Using NTFS folder junction * Remove old folder after verifying everything is working

    rmdir /S /Q C:Users

    • Create folder junction pointing to new Users folder location

    mklink /J Users <NEW_DRIVE_LETTER>:Users