复制代码 代码如下:
set path=wscript.createobject("wscript.shell")
usera=path.ExpandEnvironmentStrings("%username%")
name=inputbox("请输入你要查询的用户名","sid查询--by不追不悔",usera)
strComputer = "."
Set wbemServices = Getobject("winmgmts:\\" & strComputer)
Set wbemObjectSet=wbemServices.execquery("select sid from win32_userAccount where name='"&name&"'")
For Each mo In wbemObjectSet
sSID = mo.sid
Next
If(sSID = "")Then
WScript.Echo "对不起,无此用户"
Else
WScript.Echo sSID
End If
set path=wscript.createobject("wscript.shell")
usera=path.ExpandEnvironmentStrings("%username%")
name=inputbox("请输入你要查询的用户名","sid查询--by不追不悔",usera)
strComputer = "."
Set wbemServices = Getobject("winmgmts:\\" & strComputer)
Set wbemObjectSet=wbemServices.execquery("select sid from win32_userAccount where name='"&name&"'")
For Each mo In wbemObjectSet
sSID = mo.sid
Next
If(sSID = "")Then
WScript.Echo "对不起,无此用户"
Else
WScript.Echo sSID
End If
标签:
查询,用户名,sid,vbs
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
内蒙古资源网 Copyright www.nmgbbs.com
暂无“可以查询系统用户名sid的vbs”评论...