Script for detecting guest state with vbs

Time:2020-10-24
Copy codeThe code is as follows:
Set objNetwork = CreateObject(“Wscript.Network”) 
strComputer = objNetwork.ComputerName 
Set objUser = GetObject(“WinNT://” & strComputer & “/Guest”) 
If objUser.AccountDisabled Then 
Wscript.Echo “Guest is disabled”
Else 
Wscript.Echo “Guest is on”
End If

Recommended Today

Comparison and analysis of Py = > redis and python operation redis syntax

preface R: For redis cli P: Redis for Python get ready pip install redis pool = redis.ConnectionPool(host=’39.107.86.223′, port=6379, db=1) redis = redis.Redis(connection_pool=pool) Redis. All commands I have omitted all the following commands. If there are conflicts with Python built-in functions, I will add redis Global command Dbsize (number of returned keys) R: dbsize P: print(redis.dbsize()) […]