by Karthikeyan (187 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Unknown Difficulty
Originally Published: Thu 29th July 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get the information about the Computer System using Win32_ComputerSystem WMI Class
'Generated using 'WMI Win32 Class Autoscript Generator' - Developed by Karthikeyan
'Homepage: http://www.geocities.com/marskarthik
On Error Resume Next
Computer = "."
Set OutFile = CreateObject("WScript.Shell")
Const ForAppending = 2
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set TextFile = FileSystem.OpenTextFile ("c:\Win32_ComputerSystem.txt", ForAppending, True)
TextFile.WriteLine "Script for Win32_ComputerSystem Class by Karthikeyan"
TextFile.WriteLine
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each SubItems in Items
TextFile.WriteLine "********************************************************************"
TextFile.WriteLine "AdminPasswordStatus: " & SubItems.AdminPasswordStatus
TextFile.WriteLine "AutomaticResetBootOption: " & SubItems.AutomaticResetBootOption
TextFile.WriteLine "AutomaticResetCapability: " & SubItems.AutomaticResetCapability
TextFile.WriteLine "BootOptionOnLimit: " & SubItems.BootOptionOnLimit
TextFile.WriteLine "BootOptionOnWatchDog: " & SubItems.BootOptionOnWatchDog
TextFile.WriteLine "BootROMSupported: " & SubItems.BootROMSupported
TextFile.WriteLine "BootupState: " & SubItems.BootupState
TextFile.WriteLine "Caption: " & SubItems.Caption
TextFile.WriteLine "ChassisBootupState: " & SubItems.ChassisBootupState
TextFile.WriteLine "CreationClassName: " & SubItems.CreationClassName
TextFile.WriteLine "CurrentTimeZone: " & SubItems.CurrentTimeZone
TextFile.WriteLine "DaylightInEffect: " & SubItems.DaylightInEffect
TextFile.WriteLine "Description: " & SubItems.Description
TextFile.WriteLine "Domain: " & SubItems.Domain
TextFile.WriteLine "DomainRole: " & SubItems.DomainRole
TextFile.WriteLine "EnableDaylightSavingsTime: " & SubItems.EnableDaylightSavingsTime
TextFile.WriteLine "FrontPanelResetStatus: " & SubItems.FrontPanelResetStatus
TextFile.WriteLine "InfraredSupported: " & SubItems.InfraredSupported
TextFile.WriteLine "InitialLoadInfo: " & SubItems.InitialLoadInfo
TextFile.WriteLine "InstallDate: " & SubItems.InstallDate
TextFile.WriteLine "KeyboardPasswordStatus: " & SubItems.KeyboardPasswordStatus
TextFile.WriteLine "LastLoadInfo: " & SubItems.LastLoadInfo
TextFile.WriteLine "Manufacturer: " & SubItems.Manufacturer
TextFile.WriteLine "Model: " & SubItems.Model
TextFile.WriteLine "Name: " & SubItems.Name
TextFile.WriteLine "NameFormat: " & SubItems.NameFormat
TextFile.WriteLine "NetworkServerModeEnabled: " & SubItems.NetworkServerModeEnabled
TextFile.WriteLine "NumberOfProcessors: " & SubItems.NumberOfProcessors
TextFile.WriteLine "OEMLogoBitmap: " & SubItems.OEMLogoBitmap
TextFile.WriteLine "OEMStringArray: " & SubItems.OEMStringArray
TextFile.WriteLine "PartOfDomain: " & SubItems.PartOfDomain
TextFile.WriteLine "PauseAfterReset: " & SubItems.PauseAfterReset
TextFile.WriteLine "PowerManagementCapabilities: " & SubItems.PowerManagementCapabilities
TextFile.WriteLine "PowerManagementSupported: " & SubItems.PowerManagementSupported
TextFile.WriteLine "PowerOnPasswordStatus: " & SubItems.PowerOnPasswordStatus
TextFile.WriteLine "PowerState: " & SubItems.PowerState
TextFile.WriteLine "PowerSupplyState: " & SubItems.PowerSupplyState
TextFile.WriteLine "PrimaryOwnerContact: " & SubItems.PrimaryOwnerContact
TextFile.WriteLine "PrimaryOwnerName: " & SubItems.PrimaryOwnerName
TextFile.WriteLine "ResetCapability: " & SubItems.ResetCapability
TextFile.WriteLine "ResetCount: " & SubItems.ResetCount
TextFile.WriteLine "ResetLimit: " & SubItems.ResetLimit
TextFile.WriteLine "Roles: " & SubItems.Roles
TextFile.WriteLine "Status: " & SubItems.Status
TextFile.WriteLine "SupportContactDescription: " & SubItems.SupportContactDescription
TextFile.WriteLine "SystemStartupDelay: " & SubItems.SystemStartupDelay
TextFile.WriteLine "SystemStartupOptions: " & SubItems.SystemStartupOptions
TextFile.WriteLine "SystemStartupSetting: " & SubItems.SystemStartupSetting
TextFile.WriteLine "SystemType: " & SubItems.SystemType
TextFile.WriteLine "ThermalState: " & SubItems.ThermalState
TextFile.WriteLine "TotalPhysicalMemory: " & SubItems.TotalPhysicalMemory
TextFile.WriteLine "UserName: " & SubItems.UserName
TextFile.WriteLine "WakeUpType: " & SubItems.WakeUpType
TextFile.WriteLine "Workgroup: " & SubItems.Workgroup
TextFile.WriteLine "********************************************************************"
Next
TextFile.Close
OutFile.Run "notepad.exe c:\Win32_ComputerSystem.txt",1,True
No comments have been posted about Get the information about the Computer System using Win32_ComputerSystem WMI Class. Why not be the first to post a comment about Get the information about the Computer System using Win32_ComputerSystem WMI Class.