Windows Registry creating users

backupwindows-registrywindows-xp

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.

Best Answer

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.