strComputer
= "."
Set
objWMIService = GetObject("winmgmts:" _
&
"{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set
colSettings = objWMIService.ExecQuery _
("Select * from
Win32_OperatingSystem")
For
Each objOperatingSystem in colSettings
Msgbox "OS
Name: " & objOperatingSystem.Name
Msgbox "Version:
" & objOperatingSystem.Version
Msgbox "Service
Pack: " & _
objOperatingSystem.ServicePackMajorVersion
_
& "."
& objOperatingSystem.ServicePackMinorVersion
Msgbox "OS
Manufacturer: " & objOperatingSystem.Manufacturer
Msgbox "Windows
Directory: " & _
objOperatingSystem.WindowsDirectory
Msgbox "Locale:
" & objOperatingSystem.Locale
Msgbox "Available
Physical Memory: " & _
objOperatingSystem.FreePhysicalMemory
Msgbox "Total
Virtual Memory: " & _
objOperatingSystem.TotalVirtualMemorySize
Msgbox "Available
Virtual Memory: " & _
objOperatingSystem.FreeVirtualMemory
Msgbox "Size
stored in paging files: " & _
objOperatingSystem.SizeStoredInPagingFiles
Next
Set
colSettings = objWMIService.ExecQuery _
("Select * from
Win32_ComputerSystem")
For
Each objComputer in colSettings
Msgbox "System
Name: " & objComputer.Name
Msgbox "System
Manufacturer: " & objComputer.Manufacturer
Msgbox "System
Model: " & objComputer.Model
Msgbox "Time
Zone: " & objComputer.CurrentTimeZone
Msgbox "Total
Physical Memory: " & _
objComputer.TotalPhysicalMemory
Next
Set
colSettings = objWMIService.ExecQuery _
("Select * from
Win32_Processor")
For
Each objProcessor in colSettings
Msgbox "System
Type: " & objProcessor.Architecture
Msgbox "Processor:
" & objProcessor.Description
Next
Set
colSettings = objWMIService.ExecQuery _
("Select * from
Win32_BIOS")
For
Each objBIOS in colSettings
Msgbox "BIOS
Version: " & objBIOS.Version
Next
No comments:
Post a Comment