CPU info

Haluk

Rules Violation
Joined
Oct 26, 2002
Messages
1,075
Hi all,

I used the below procedure to return the available CPU name(s) on my PC. (Win2000+Office2000)

Code:
Sub Processor()
Dim MyOBJ, Cpu, MyMsg
Set MyOBJ = GetObject("WinMgmts:").InstancesOf _
            ("Win32_Processor")
    For Each Cpu In MyOBJ
        MyMsg = MyMsg & Cpu.Name & vbCrLf
    Next
MsgBox MyMsg
End Sub

But;

1) In a similar way I tried to get the serial number of the CPU but, I couldn't get it.

2) By using "Cpu.CurrentClockSpeed" I get 466 Mhz as CPU speed where as, it is actually 600 Mhz.

I need to find the physical serial number of the PC and will be glad if someone can explain me why the procedure returned me the wrong CPU speed.

Thanks a lot and wish you a happy day to all...
 
Hi Ivan;

Thank you vey much for your valuable information and thanks again for spending your time on the subject.

I will study the information you've given. That's just great....

And by the way, I've just generated the below to get some info about the local and remote drives that the PC is looged on,

Code:
Sub DriveInfo()
Dim objWMIService As Object
Dim objItem As Object
Dim strComputer As String
Dim msg As String
strComputer = "."

Set objWMIService = GetObject _
                   ("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
               ("Select * from Win32_LogicalDisk", , 48)
For Each objItem In colItems
    size = objItem.size / 1024 / 1024 / 1024
    freespace = objItem.freespace / 1024 / 1024
    msg = msg & "Volume - " & objItem.Name & _
    "  Size = " & Format(size, "0.00 Gb") & _
    "  Free Space = " & Format(freespace, "0.00 Mb") & vbCrLf
Next
MsgBox msg, vbInformation, "Drive Info !"
End Sub


Thank you very much for your great info and support.

Regards from Turkey,
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,212,927
Messages
6,110,708
Members
448,293
Latest member
jin kazuya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top