用VBS检测Guest状态的脚本
程序员文章站
2022-07-04 20:47:17
复制代码 代码如下:set objnetwork = createobject("wscript.network") strcom...
复制代码 代码如下:
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