您的位置:首页 > 编程语言 > VB

Win32_LogicalMemoryConfiguration在win7下无法使用

2019-01-15 11:20 525 查看

strComputer = "."

Set objSWbemServices = GetObject("winmgmts:\" & strComputer)
Set colSWbemObjectSet = _
objSWbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")

For Each objSWbemObject In colSWbemObjectSet
Wscript.Echo "Total Physical Memory (kb): " & _
objSWbemObject.TotalPhysicalMemory
Next
这段代码在win7下无法运行报错(null): 0x80041010 在win2003下可以运行,win7下已经取消此类

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vbs