Creating all Subsequent Users on External HD

Diomedes

New Member
Messages
2
Hi all -

I want to set up my computer so that my administrative User account is stored locally, but all subsequent user accounts created are created on an external HD.

Many of the guides and tutorials which show how to do this involve changing the registry, which I believe will not allow me to diferentiate between my current admin account and all subsequently created user accounts. I think this will mess with my locally stored user account. I do NOT want my computer to go looking for my administartive account on my external drive.

I was following this guide:
http://www.eightforums.com/tutorials/4275-user-profiles-relocate-another-partition-disk.html

Until it got to the part where you needed your USB/DVD with your Win8 installation media, which I do not have.


Other guides on how to change the user location (I think) will permanently change the location of ALL user files, including the Administrator's which I want to keep locally on my machine.


Examples -
How to Change User Profile Default Location in Windows 7 | Next of Windows
How To Change User Profile Location in Windows 8 without Registry Hack | Next of Windows



Finally - I want to be able to create the user accounts on the external drive directly, and I do not want to create them locally and port them over as some other guides have shown. I will be doing this process for dozens, maybe 100's of accounts over time and I do not want to go through the hassle of porting over every account I make.


If this is possible, please let me know how to do it. If it's impossible, please let me know so I can stop looking for a way to do it :)
 

My Computer

System One

  • OS
    Win 8
    Computer type
    Laptop
    CPU
    Intel
    Browser
    Mozilla
Run regedit as an administrator
Find the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Modify ProfilesDirectory to whatever your external Drive is.

It works even on 8.1, and all your next user profiles will be directed there. Keep in mind that unlike under unix moving whole user profiles locations while possible, isn't recommended by microsoft and can break some updates. The recommended microsoft way is to only move the subfolders of user profiles (my documents, my images, my videos, etc...), but this involves doing what you don't want (create locally then move them).

More info from MS here : ProfilesDirectory
 
Last edited:

My Computer

System One

  • OS
    Windows 8.1 (x64)
    Computer type
    PC/Desktop
Here is an attempt at a powershell script. Never done any so there might be mistakes, I usually only create batch command files, so feel free to modify it yourself or ask further help from experts. This isn't tested, I'm on linux atm and can't access my windows pc.

Open notepad and paste this :

Code:
# Start of script
# This defines your Default Users Path, modify to whatever you wish

Set-Variable userspath -option Constant -value "D:\Users\"

# User Input

$newname = Read-Host 'What is the new user's name ?'
$newpass = Read-Host 'What is the password ?'
$newpath = userspath+$newname+"\"

# Creation of the account
# Local Users not domain

New-LocalUser -username $newname -password $newpass
Set-Localgroup -username $newname -groupname "Users" -add

# Valid folders taken from Microsoft recommendations
# http://support.microsoft.com/kb/931087

# Creation of folders

New-Item -Path (userspath+$newname) -ItemType directory
New-Item -Path (userspath+$newname+"\Application Data") -ItemType directory
New-Item -Path (userspath+$newname+"\Desktop") -ItemType directory
New-Item -Path (userspath+$newname+"\Fonts") -ItemType directory
New-Item -Path (userspath+$newname+"\Local Settings") -ItemType directory
New-Item -Path (userspath+$newname+"\My Documents") -ItemType directory
New-Item -Path (userspath+$newname+"\My Pictures") -ItemType directory
New-Item -Path (userspath+$newname+"\Network Neighborhood") -ItemType directory
New-Item -Path (userspath+$newname+"\Print Neighborhood") -ItemType directory
New-Item -Path (userspath+$newname+"\Programs Group") -ItemType directory
New-Item -Path (userspath+$newname+"\Recent") -ItemType directory
New-Item -Path (userspath+$newname+"\Send To") -ItemType directory
New-Item -Path (userspath+$newname+"\Start Menu") -ItemType directory
New-Item -Path (userspath+$newname+"\Startup Group") -ItemType directory
New-Item -Path (userspath+$newname+"\Templates") -ItemType directory

# Rerieves the SID for the new account

$objUser = New-Object System.Security.Principal.NTAccount($newname)
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier])
$regkey = "HKU:\"+$strSID.Value+"\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"

# Modification of registry to allow folder redirection

Set-ItemProperty -Path $regkey -Name AppData -Value ($newpath+"Application Data")
Set-ItemProperty -Path $regkey -Name Desktop -Value ($newpath+"Desktop")
Set-ItemProperty -Path $regkey -Name Fonts -Value ($newpath+"Fonts")
Set-ItemProperty -Path $regkey -Name Local Settings -Value ($newpath+"Local Settings")
Set-ItemProperty -Path $regkey -Name Personal -Value ($newpath+"My Documents")
Set-ItemProperty -Path $regkey -Name My Pictures -Value ($newpath+"My Pictures")
Set-ItemProperty -Path $regkey -Name NetHood -Value ($newpath+"Network Neighborhood")
Set-ItemProperty -Path $regkey -Name PrintHood -Value ($newpath+"Print Neighborhood")
Set-ItemProperty -Path $regkey -Name Programs -Value ($newpath+"Programs Group")
Set-ItemProperty -Path $regkey -Name Recent -Value ($newpath+"Recent")
Set-ItemProperty -Path $regkey -Name SendTo -Value ($newpath+"Send To")Set-ItemProperty -Path $regkey -Name Start Menu -Value ($newpath+"Start Menu")
Set-ItemProperty -Path $regkey -Name StartUp -Value ($newpath+"Startup Group")Set-ItemProperty -Path $regkey -Name Templates -Value ($newpath+"Templates")

# end of script

Save it as NewUser.ps1


What does this script do ? It asks for user name and password then create the account, new folders on the appropriate path, and redirects the user profile folders to those. All of this automatically. Note this is all setup for local user accounts, change it appropriately if using a domain.
 
Last edited:

My Computer

System One

  • OS
    Windows 8.1 (x64)
    Computer type
    PC/Desktop
A few updates -

1. Thank you for your attempt, but the powershell script did not work. Got a billion errors, started messing with the script to see if it could happen, and it just didn't.

2. I changed the registry so that all users are stored on the Z:\\ directory and it did not seem to effect my current admin account.

All was well until I started actually using the computer as intended. I now have 51 user accounts on the computer and upon user logout, with the external drive attached or not, all users on the computer are invisible on the login screen. The icons appear without Titles under them if I hover the cursor over them, but it is impossible to tell what user account I'm using until clicking the User account. With Win8's "swipe like an ipad to scroll through users" function this is extremely annoying to deal with when one has more than 10 user accounts.


My temporary remedy has been to reboot the machine, log in to the last account on the list (the admin) and then switch users into the desired user.

This is not acceptable for a long-term fix and I am disappointed that I cant get this working as intended.
 

My Computer

System One

  • OS
    Win 8
    Computer type
    Laptop
    CPU
    Intel
    Browser
    Mozilla
Back
Top