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
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
-
-
网友评论