Category Archives: WMI

Use WMI to get operating system information in C#

When the program starts, it executes the WMI query SELECT * FROM Win32_OperatingSystem. It loops through the results and calls subroutine GetValue for each of the many system parameters that should be available. The following code shows just a couple … Continue reading

Posted in system, WMI | Tagged , , , , , , , , , , , , , , , | 1 Comment

Use WMI to get the number of physical and logical processors in C#

This example shows how you can determine your computer’s number of processors, both physical and logical. Many computers these days contain multiple CPUs. Each CPU may contain multiple cores, processors that can execute instructions. Finally, some cores can execute multiple … Continue reading

Posted in performance, system, threading, WMI | Tagged , , , , , , , , , , , , , , , | Leave a comment

Get the system’s board serial numbers and CPU IDs in C#

This example shows how to get the system’s board serial numbers and CPU IDs. WMI (Windows Management Instrumentation) lets you use SQL-like statements to ask the computer about itself. The GetBoardSerialNumbers function shown in the following code returns a list … Continue reading

Posted in system, WMI | Tagged , , , , , , , , , , , , | 3 Comments

Use WMI to get information including the operating system’s name in C#

WMI (Windows Management Instrumentation) lets you use SQL-like statements to ask the computer about itself. This example uses it to get: The operating system name including its edition (Home, Ultimate, etc.), version, and Service Pack number The number of logical … Continue reading

Posted in system, WMI | Tagged , , , , , , , , , , , , , | Leave a comment

Use WMI to get detailed printer information in C#

This example shows how you can use WMI to get printer information for the printers installed on your system. When the program loads, it uses the following code to list the system’s installed printers. // List the installed printers. private … Continue reading

Posted in printers, system, WMI | 1 Comment