Posted: Sat Jan 18, 2020 1:21 pm Post subject: A little help @atom0s
A little help @ atom0s
The code below; VB.Script activation code.
But it gives the results in separate windows.
How to arrange to get the whole list in one window?
Code:
' List Processor Information
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objCS In colCSes
WScript.Echo "Computer Name: " & objCS.Name
WScript.Echo "System Type: " & objCS.SystemType
WScript.Echo "Number Of Processors: " & objCS.NumberOfProcessors
Next
Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objProcessor in colProcessors
WScript.Echo "Manufacturer: " & objProcessor.Manufacturer
WScript.Echo "Name: " & objProcessor.Name
WScript.Echo "Description: " & objProcessor.Description
WScript.Echo "Processor ID: " & objProcessor.ProcessorID
WScript.Echo "Address Width: " & objProcessor.AddressWidth
WScript.Echo "Data Width: " & objProcessor.DataWidth
WScript.Echo "Family: " & objProcessor.Family
WScript.Echo "Maximum Clock Speed: " & objProcessor.MaxClockSpeed
Next
+ If possible; Can we print the results on UDF1.CEMemo1? _________________
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
Posted: Sat Jan 18, 2020 10:55 pm Post subject:
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
Dim result
For Each objCS In colCSes
result = "Computer Name: " & objCS.Name & vbCrLf
result = result & "System Type: " & objCS.SystemType & vbCrLf
result = result & "Number Of Processors: " & objCS.NumberOfProcessors & vbCrLf
Next
result = result & vbCrLf
Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objProcessor in colProcessors
result = result & "Manufacturer: " & objProcessor.Manufacturer & vbCrLf
result = result & "Name: " & objProcessor.Name & vbCrLf
result = result & "Description: " & objProcessor.Description & vbCrLf
result = result & "Processor ID: " & objProcessor.ProcessorID & vbCrLf
result = result & "Address Width: " & objProcessor.AddressWidth & vbCrLf
result = result & "Data Width: " & objProcessor.DataWidth & vbCrLf
result = result & "Family: " & objProcessor.Family & vbCrLf
result = result & "Maximum Clock Speed: " & objProcessor.MaxClockSpeed & vbCrLf
Next
Thanks master.
I will share a system code in CE lua.
Thank you for editing this detail.
I never see teaching simple. And +1. Thanks again. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum