Is there a way to create a user in Windows XP via Batch Script and even assign it administrator/limited user value?
Suppose the username is rased and password is pAsS
net user rased pAsS /add
net localgroup administrators rased /add
here user is added under administrators group.
Yes, you can create a user by running net user USERNAME PASSWORD /add
(omit the PASSWORD if you do not wish to have a password for this account, use *
for PASSWORD to require the user to enter a password at run time). This creates a "limited user"; if you wish to make the new user an administrator, run net localgroup Administrators USERNAME /add
after creating the user.
来源:https://stackoverflow.com/questions/7500844/batch-script-create-user-in-windows-xp-programmatically