Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

can i create local users just using windows registry? i write the programm wich help me to migrate my from one computer to another. When i work with domain user i can save it settings with windows registry and saving ProfileImagePath folder. now i want to save local users by this way.

share|improve this question

2 Answers 2

No, you need more than the registry in order to create a user. You have to script it or use another language that can interact with something like WMI to create users. Some profile items and settings are stored in the registry, but you also have things like the user's profile folder (including the ntuser.dat file) and the password which are not part of the registry.

share|improve this answer
    
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList it contains info about all user's profile folder –  Xaver Apr 28 '10 at 4:49
    
And the password resides in the systems SAM file, typically found at C:\Windows\System32\config\. This file is locked down to all but the SYSTEM account I believe. –  Gomibushi Apr 28 '10 at 6:22
2  
...and trying to edit it manually would be a Very Bad Thing (TM) –  Massimo Apr 28 '10 at 9:00

With a little VBS scripting you can do this (copied from here):

strComputer = "MyComputer"
Set colAccounts = GetObject("WinNT://" & strComputer & "")
Set objUser = colAccounts.Create("user", "Admin2")
objUser.SetPassword "test"
objUser.SetInfo

Note: you do not interact with the registry at all, instead with the SAM.

share|improve this answer
    
good script but i want to transferred domain user applications setting from one computer to another. –  Xaver Apr 29 '10 at 11:08
    
@Xaver: Please update the question then. Because moving a domain user's profile is a completely different thing (for a start, you don't create a user). –  Richard Apr 30 '10 at 7:33
    
i write the 2 scripts for domain user. First save folder settings of domain user. Second load folder settings to domain user, if settings folder is not exist the script not working. –  Xaver May 4 '10 at 9:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.