Imports System
Imports System.Management
Module Module1
Public Sub Main()
Dim strComputer = "ComputerName" '计算机名
Dim wbemServices, wbemObjectSet, wbemObject
wbemServices = GetObject("winmgmts:\\" & strComputer)
wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")
For Each wbemObject In wbemObjectSet
Console.WriteLine("物理内存的大小 (kb):" & wbemObject.TotalPhysicalMemory)
Next
End Sub
End Module
没有评论:
发表评论