(code taken from another thread, thank you, Ken Tucker)
Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Processor")
moReturn = moSearch.Get
For Each mo In moReturn
Dim strout As String = String.Format("{0} - {1}", mo("Name"),
mo("CurrentClockSpeed"))
MsgBox(strout)
Next
On my Windows NT test machine I get this exception:
System.Runtime.InteropServices.COMException (0x80040154): COM object with
CLSID {4590F811-1D3A-11D0-891F-00AA004B2E24} is either not valid or not
registered.
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementObjectSearcher.Initial ize()
at System.Management.ManagementObjectSearcher.Get()
at CPUInfo.Main.main()
I'd really like to be able to move my CPU info-collecting code to DotNet...
right now I still use an old VB6 dll. Is there a way to get this work on any
machine with the Framework installed?
Paul