如下
SET oShell = CREATEOBJECT("Wscript.Shell")
Const ForReading = 1
strDomainName="tjadri.com"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
("c:\\account.txt", ForReading)
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
arrServiceList = Split(strNextLine , ",")
strCurrentUserName= strDomainName & "\" & arrServiceList(0)
Loop
msgbox strCurrentUserName
strCommand= "cmd /c net localgroup administrators " & strCurrentUserName & " /add"
msgbox strCommand
SET oExec = oShell.Exec(strCommand)
慕村9548890
幕布斯6054654
相关分类