Board logo

标题: [技术讨论] WMI中限定符的疑问 [打印本页]

作者: czjt1234    时间: 2013-3-21 11:07     标题: WMI中限定符的疑问

本帖最后由 czjt1234 于 2013-3-21 11:08 编辑
  1. Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
  2. Set objSWbemServices = objSWbemLocator.ConnectServer()
  3. Set objSWbemObject = objSWbemServices.Get("win32_service")
  4. Set objSWbemQualifierSet = objSWbemObject.Properties_.Item("CreationClassName").Qualifiers_
  5. strQualifier = "该类的限定符的个数:" & objSWbemQualifierSet.Count & vbCrLf & vbCrLf
  6. For Each objSWbemQualifier In objSWbemQualifierSet
  7.     strQualifier = strQualifier & objSWbemQualifier.Name & vbCrLf
  8. Next
  9. Msgbox strQualifier
  10. Msgbox "cim_key限定符的值:" & objSWbemQualifierSet.Item("cim_key").Value
复制代码
http://msdn.microsoft.com/en-us/library/aa393650.aspx中没有cim_key这个限定符类型啊?

还有http://msdn.microsoft.com/en-us/library/windows/desktop/aa394418(v=vs.85).aspx里
说CreationClassName属性
CreationClassName
Data type: string
Access type: Read-only
Qualifiers: MaxLen (256)
有限定符MaxLen,但上述代码里并没有显示,什么原因?




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2