📄 sol10-1.vbs
字号:
Dim objService, objWMIObject, objWMIObjects
'create an instance of a Services object for namespace root\cimv2
Set objServices = _
GetObject("winmgmts:{impersonationLevel=impersonate}!root\cimv2")
'create a collection of Win32_ComputerSystem class objects
Set objWMIObjects = objServices.InstancesOf("Win32_ComputerSystem")
'enumerate collection.. there will only be one object, the local computer
For Each objWMIObject In objWMIObjects
'display some information from the class
WScript.Echo "Computer description:" & objWMIObject.Description
WScript.Echo "Physical memory:" & objWMIObject.TotalPhysicalMemory
WScript.Echo "Manufacturer:" & objWMIObject.Manufacturer
Next
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -