VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get the system processor info using Win32_Processor WMI Class

by Karthikeyan (187 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Unknown Difficulty
Originally Published: Tue 26th October 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Get the system processor info using Win32_Processor WMI Class

Rate Get the system processor info using Win32_Processor 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_Processor.txt", ForAppending, True)
TextFile.WriteLine "Script for Win32_Processor Class by Karthikeyan"
TextFile.WriteLine 
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each SubItems in Items
TextFile.WriteLine "********************************************************************"
    TextFile.WriteLine "AddressWidth: " & SubItems.AddressWidth
    TextFile.WriteLine "Architecture: " & SubItems.Architecture
    TextFile.WriteLine "Availability: " & SubItems.Availability
    TextFile.WriteLine "Caption: " & SubItems.Caption
    TextFile.WriteLine "ConfigManagerErrorCode: " & SubItems.ConfigManagerErrorCode
    TextFile.WriteLine "ConfigManagerUserConfig: " & SubItems.ConfigManagerUserConfig
    TextFile.WriteLine "CpuStatus: " & SubItems.CpuStatus
    TextFile.WriteLine "CreationClassName: " & SubItems.CreationClassName
    TextFile.WriteLine "CurrentClockSpeed: " & SubItems.CurrentClockSpeed
    TextFile.WriteLine "CurrentVoltage: " & SubItems.CurrentVoltage
    TextFile.WriteLine "DataWidth: " & SubItems.DataWidth
    TextFile.WriteLine "Description: " & SubItems.Description
    TextFile.WriteLine "DeviceID: " & SubItems.DeviceID
    TextFile.WriteLine "ErrorCleared: " & SubItems.ErrorCleared
    TextFile.WriteLine "ErrorDescription: " & SubItems.ErrorDescription
    TextFile.WriteLine "ExtClock: " & SubItems.ExtClock
    TextFile.WriteLine "Family: " & SubItems.Family
    TextFile.WriteLine "InstallDate: " & SubItems.InstallDate
    TextFile.WriteLine "L2CacheSize: " & SubItems.L2CacheSize
    TextFile.WriteLine "L2CacheSpeed: " & SubItems.L2CacheSpeed
    TextFile.WriteLine "LastErrorCode: " & SubItems.LastErrorCode
    TextFile.WriteLine "Level: " & SubItems.Level
    TextFile.WriteLine "LoadPercentage: " & SubItems.LoadPercentage
    TextFile.WriteLine "Manufacturer: " & SubItems.Manufacturer
    TextFile.WriteLine "MaxClockSpeed: " & SubItems.MaxClockSpeed
    TextFile.WriteLine "Name: " & SubItems.Name
    TextFile.WriteLine "OtherFamilyDescription: " & SubItems.OtherFamilyDescription
    TextFile.WriteLine "PNPDeviceID: " & SubItems.PNPDeviceID
    TextFile.WriteLine "PowerManagementCapabilities: " & SubItems.PowerManagementCapabilities
    TextFile.WriteLine "PowerManagementSupported: " & SubItems.PowerManagementSupported
    TextFile.WriteLine "ProcessorId: " & SubItems.ProcessorId
    TextFile.WriteLine "ProcessorType: " & SubItems.ProcessorType
    TextFile.WriteLine "Revision: " & SubItems.Revision
    TextFile.WriteLine "Role: " & SubItems.Role
    TextFile.WriteLine "SocketDesignation: " & SubItems.SocketDesignation
    TextFile.WriteLine "Status: " & SubItems.Status
    TextFile.WriteLine "StatusInfo: " & SubItems.StatusInfo
    TextFile.WriteLine "Stepping: " & SubItems.Stepping
    TextFile.WriteLine "SystemCreationClassName: " & SubItems.SystemCreationClassName
    TextFile.WriteLine "SystemName: " & SubItems.SystemName
    TextFile.WriteLine "UniqueId: " & SubItems.UniqueId
    TextFile.WriteLine "UpgradeMethod: " & SubItems.UpgradeMethod
    TextFile.WriteLine "Version: " & SubItems.Version
    TextFile.WriteLine "VoltageCaps: " & SubItems.VoltageCaps
TextFile.WriteLine "********************************************************************"
Next
TextFile.Close
OutFile.Run "notepad.exe c:\Win32_Processor.txt",1,True


Download this snippet    Add to My Saved Code

Get the system processor info using Win32_Processor WMI Class Comments

No comments have been posted about Get the system processor info using Win32_Processor WMI Class. Why not be the first to post a comment about Get the system processor info using Win32_Processor WMI Class.

Post your comment

Subject:
Message:
0/1000 characters