復(fù)制代碼 代碼如下:
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set objUser = GetObject("WinNT://" & strComputer & "/Guest")
If objUser.AccountDisabled Then
Wscript.Echo "Guest為禁用狀態(tài)"
Else
Wscript.Echo "Guest為開(kāi)啟狀態(tài)"
End If