據我所知,以下腳本的輸出應該包含Windows XP及更高版本中的「Win32_PerfRawData_PerfDisk_PhysicalDisk」,但它不適用於Vista商業版32位Service Pack 2中的內容。到目前爲止,我一直非常不成功地使用Google搜索關於這個表演課程的信息。Win32_PerfFormattedData_PerfDisk_PhysicalDisk在Vista中是否缺少WMI?
strComputer = "."
Set objWMIService=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\cimv2")
For Each objclass in objWMIService.SubclassesOf()
Wscript.Echo objClass.Path_.Class
Next
這個WMI類在Vista中不存在嗎?如果只是我,是否有解決WMI的方法?我已經嘗試運行winmgmt/resetrepository和winmgmt/resyncperf,但都沒有幫助。
編輯:排序和編輯輸出
喀嚓...
- Win32_PerfFormattedData_NETFramework_NETCLRSecurity
- Win32_PerfFormattedData_Outlook_Outlook
- Win32_PerfFormattedData_PerfNet_Browser
- Win32_PerfFormattedData_Per fNet_Redirector
喀嚓...
Win32_PerfFormattedData_PerfDisk_ *丟失。
也試過lodctr/R。沒有幫助。
解決
這些計數器可以在註冊表被禁用。只需將HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Perfdisk \ Performance \ Disable Performance Counters設置爲0並重新啓動即可。
WMICOOKR.dll(74,752字節)和WmiPerfInst.dll(47,104字節)都出現並佔了。 – Martin 2010-03-30 05:38:17
然後你已經超越了我的技能水平,@Martin,對不起,我不能進一步幫助。希望在WMI/Vista方面有更多經驗的人將會很快出現。祝你好運。 – paxdiablo 2010-03-30 05:39:58