http://dieseyer.de • all rights reserved • © 2011 v11.4
'*** v10.C *** www.dieseyer.de *****************************
'
' Datei: wmi-winversp.vbs
' Autor: dieseyer@gmx.de
' Auf: www.dieseyer.de
'
' Programm ermittelt WindowsNT-Version und Sp-Version
'
' Microsoft: The Portable Script Center - v3.0, Nov. 2004
' "List System Information"
'
'***********************************************************
Option Explicit
MsgBox ListSystemInformation( "." ), , "16 :: " & WScript.ScriptName
WScript.Quit
'*** v10.C *** www.dieseyer.de *****************************
Function ListSystemInformation( PC )
'***********************************************************
Dim objWMIService, colSettings, objOperatingSystem, objComputer, objProcessor, objBIOS
Dim Txt
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & PC & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colSettings
Txt = Txt & vbCRLF & "OS Name: " & vbTab & vbTab & objOperatingSystem.Name
Txt = Txt & vbCRLF & "OSArchitecture: " & vbTab & vbTab & objOperatingSystem.OSArchitecture
Txt = Txt & vbCRLF & "Version: " & vbTab & vbTab & vbTab & objOperatingSystem.Version
Txt = Txt & vbCRLF & "Service Pack: " & vbTab & vbTab & objOperatingSystem.ServicePackMajorVersion & "." & objOperatingSystem.ServicePackMinorVersion
Txt = Txt & vbCRLF & "OS Manufacturer: " & vbTab & vbTab & objOperatingSystem.Manufacturer
Txt = Txt & vbCRLF & "Windows Directory: " & vbTab & objOperatingSystem.WindowsDirectory
Txt = Txt & vbCRLF & "Locale: " & vbTab & vbTab & vbTab & objOperatingSystem.Locale
Txt = Txt & vbCRLF & "Available Physical Memory: " & vbTab & objOperatingSystem.FreePhysicalMemory
Txt = Txt & vbCRLF & "Total Virtual Memory: " & vbTab & objOperatingSystem.TotalVirtualMemorySize
Txt = Txt & vbCRLF & "Available Virtual Memory: " & vbTab & objOperatingSystem.FreeVirtualMemory
Txt = Txt & vbCRLF & "Size stored in paging files: " & vbTab & objOperatingSystem.SizeStoredInPagingFiles
Next
Set colSettings = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
Txt = Txt & vbCRLF & "System Name: " & vbTab & vbTab & objComputer.Name
Txt = Txt & vbCRLF & "System Manufacturer: " & vbTab & objComputer.Manufacturer
Txt = Txt & vbCRLF & "System Model: " & vbTab & vbTab & objComputer.Model
Txt = Txt & vbCRLF & "Time Zone: " & vbTab & vbTab & objComputer.CurrentTimeZone
Txt = Txt & vbCRLF & "Total Physical Memory: " & vbTab & objComputer.TotalPhysicalMemory
Next
Set colSettings = objWMIService.ExecQuery ("Select * from Win32_Processor")
For Each objProcessor in colSettings
Txt = Txt & vbCRLF & "System Type: " & vbTab & vbTab & objProcessor.Architecture
Txt = Txt & vbCRLF & "Processor: " & vbTab & vbTab & objProcessor.Description
Next
Set colSettings = objWMIService.ExecQuery ("Select * from Win32_BIOS")
For Each objBIOS in colSettings
Txt = Txt & vbCRLF & "BIOS Version: " & vbTab & vbTab & objBIOS.Version
Next
ListSystemInformation = Txt
End Function ' ListSystemInformation( PC )
http://dieseyer.de • all rights reserved • © 2011 v11.4