I have some code that needs to know how many actual cores are available on my particular machine, and whether or not Hyperthreading is enabled.
Is there a way to do this in C#?
Update: The machines are a mix of XP and Vista
Update: Accessing 'Win32_Processor.NumberOfCores' or 'Win32_Processor.NumberOfLogicalProcessors' throws an exception (a ManagmentException with the message "Not Found") on one of the machines (but not all of them)