用vbs實(shí)現(xiàn)本地添加用戶的腳本
更新時(shí)間:2008年06月15日 21:23:29 作者:
這個(gè)方法我第一次看到,以前都是用wscript.shell運(yùn)行,這個(gè)是sendkeys方法
Dim WshShell
set WshShell = CreateObject("wscript.Shell")
WshShell.Run "cmd /k"
for i = 1 to 3
WScript.Sleep 500
WshShell.SendKeys "net user admin" & i & " abcd@123 /add"
WshShell.SendKeys "{ENTER}"
next
WshShell.SendKeys "exit"
WshShell.SendKeys "{ENTER}"
set WshShell = CreateObject("wscript.Shell")
WshShell.Run "cmd /k"
for i = 1 to 3
WScript.Sleep 500
WshShell.SendKeys "net user admin" & i & " abcd@123 /add"
WshShell.SendKeys "{ENTER}"
next
WshShell.SendKeys "exit"
WshShell.SendKeys "{ENTER}"
相關(guān)文章
用VBS腳本實(shí)現(xiàn)更換Windows Xp序列號(hào)的代碼
用vbs實(shí)現(xiàn)更改winxp序列號(hào),不用任何軟件2008-05-05
用VBS可執(zhí)行程序+Xmlhttp下載備份網(wǎng)上文件的代碼
用VBS可執(zhí)行程序+Xmlhttp下載備份網(wǎng)上文件的代碼...2007-08-08
利用vbscript的for命令實(shí)現(xiàn)定時(shí)關(guān)機(jī)
利用vbscript的for命令實(shí)現(xiàn)定時(shí)關(guān)機(jī)...2007-12-12

