欢迎光临
我们一直在努力

批量创建win帐号的脚本程序-ASP教程,脚本编码

建站超值云服务器,限时71元/月

很久以前做压力测试,模拟多用户访问,批量创建win帐号的脚本程序.文件名为 createuser.js,运行命令是:

createuser.js /user:share /password:qazw /start:1 /count:120

function run()

{

wshshell = wscript.createobject("wscript.shell")

//msg = wshshell.run("net user share1 qazw /add",1,true)

var argsunnamed = wscript.arguments.named;

var count = argsunnamed("count")

username = argsunnamed("user")

password = argsunnamed("password")

start = argsunnamed("start")

if(start ==null)

{

start=1

}

else

{

start=parseint(start)

}

if(username==null)

{

wscript.echo("no username")

return

}

if(password==null)

{

wscript.echo("no password")

return

}

if(count==null)

{

wshshell.run("net user "+ username +" " + password + " /delete",1,true)

}

else

{

count=parseint(count)

var i =0;

for( ;i<count;i++)

{

wshshell.run("net user "+ username+(start+i)+" " + password + " /add",0)

}

}

}

run()

//wshshell.popup(msg)

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 批量创建win帐号的脚本程序-ASP教程,脚本编码
分享到: 更多 (0)

相关推荐

  • 暂无文章