可以用CreateObject创建的WMI对象

标签: , , ,

WMI对象有很多,但并不是所有的WMI对象都可以用CreateObject函数来创建,只有少部分可以。

'By Demon
'http://demon.tw
'create an object for WMI in VBScript by calling CreateObject
Set objSWbemDateTime = CreateObject("WbemScripting.SWbemDateTime")
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemObjectPath = CreateObject("WbemScripting.SWbemObjectPath")
Set objSWbemNamedValueSet = CreateObject("WbemScripting.SWbemNamedValueSet")
Set objSWbemRefresher = CreateObject("WbemScripting.SWbemRefresher")
Set objSWbemSink = CreateObject("WbemScripting.SWbemSink")
Set objSWbemLastError = CreateObject("WbemScripting.SWbemLastError")
'If error information is not available, an attempt to create an error object will fail.

参考链接:http://msdn.microsoft.com/zh-cn/library/windows/desktop/aa389744%28v=vs.85%29.aspx

随机文章:

  1. C/C++的64位整型
  2. 各浏览器禁止内容选中的方式
  3. JavaScript的Trim函数有12种写法,你可知道么?
  4. WMI工具:WMI Event Registration Tool
  5. 本地机器和Windows 2003远程桌面之间复制粘贴文件

留下回复