2
我一直在尋找一種以編程方式輸出WMI類屬性的說明的方法,但無法找到如何訪問修改的限定符。如何使用Vbscript顯示WMI類屬性的描述?
我見過this question on how to use VBScript to display WMI class descriptions,使用下面的代碼片段:
Const wbemFlagUseAmendedQualifiers = &H20000
Set oWMI = GetObject("winmgmts:\\.\root\cimv2")
Set oClass = oWMI.Get("Win32_OperatingSystem", wbemFlagUseAmendedQualifiers)
WScript.Echo oClass.Qualifiers_("Description").Value
下面的圖像是我想提取,在WMI代碼創建者顯示的內容:
有沒有一種方法像這樣可以顯示說明?
Set oWMI = GetObject("winmgmts:\\.\root\cimv2")
Set oProp = oWMI.Get("Win32_OperatingSystem.BootDevice", wbemFlagUseAmendedQualifiers)
WScript.Echo oProp.Qualifiers_("Description").Value
輝煌。現在我明白這一點非常有意義。優秀,簡潔的答案。謝謝! – treehead