首页 > 编程 > VBScript > 正文

vbs在网页中显示服务

2020-07-26 12:15:42
字体:
来源:转载
供稿:网友

strComputer = "."

Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"  
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Visible = 1

Set objWMIService = GetObject _
    ("winmgmts://" & strComputer & "/root/cimv2")
Set colItems = objWMIService.ExecQuery _
  ("SELECT * FROM Win32_Service")

For Each objItem in colItems
    strHTML = strHTML & objItem.DisplayName  & " = " & objItem.State & "<BR>"
Next

objExplorer.Document.Body.InnerHTML = strHTML

上一篇:vbs得没公开对象

下一篇:返回列表

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表