站长资源脚本专栏
用VBS检测Guest状态的脚本
简介复制代码 代码如下:Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Set objUser = GetObject("WinNT://" & strComputer &
复制代码 代码如下:
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set objUser = GetObject("WinNT://" & strComputer & "/Guest")
If objUser.AccountDisabled Then
Wscript.Echo "Guest为禁用状态"
Else
Wscript.Echo "Guest为开启状态"
End If
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set objUser = GetObject("WinNT://" & strComputer & "/Guest")
If objUser.AccountDisabled Then
Wscript.Echo "Guest为禁用状态"
Else
Wscript.Echo "Guest为开启状态"
End If
上一篇:用vbs实现注册表开关的脚本
下一篇:禁止QQ上网的vbs脚本代码