Batch Script - Create user in Windows XP programmatically

眉间皱痕 提交于 2019-12-07 04:56:19

问题


Is there a way to create a user in Windows XP via Batch Script and even assign it administrator/limited user value?


回答1:


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.




回答2:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!