据我所知,以下脚本的输出应该包含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