TizzyT

CPU ID

Sep 16th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Management;
  6. static class Module1
  7. {
  8.     public static void Main()
  9.     {
  10.         ManagementObjectSearcher cpu =
  11.             new ManagementObjectSearcher("SELECT ProcessorId FROM Win32_Processor");
  12.         foreach (ManagementObject dvs in cpu.Get())
  13.         {
  14.             string id = dvs["ProcessorId"].ToString();
  15.             Console.WriteLine(id);
  16.         }
  17.         Console.ReadKey();
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment