½Ã½ºÅÛ ID Àбâ

¹«¾Æ   
   Á¶È¸ 4043   Ãßõ 2    

BoardIdTest.exe (10.5K), Down : 26, 2019-09

label1.Text = GetMotherBoardID();
label2.Text = GetCpuID();
label3.Text = ComputerSID;
label4.Text = UUID;

 순서로 출력됩니다.

닷넷 4.6 인가 설치되어 있어야 할 겁니다. 윈10 이면 기본으로 설치되어 있을 거구요.




namespace BoardIdTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public static string GetMotherBoardID()
        {
            string mbInfo = String.Empty;
            ManagementScope scope = new ManagementScope("\\\\" + Environment.MachineName + "\\root\\cimv2");
            scope.Connect();
            ManagementObject wmiClass = new ManagementObject(scope, new ManagementPath("Win32_BaseBoard.Tag=\"Base Board\""), new ObjectGetOptions());

            foreach (PropertyData propData in wmiClass.Properties)
            {
                if (propData.Name == "SerialNumber")
                {
                    //mbInfo = String.Format("{0,-25}{1}", propData.Name, Convert.ToString(propData.Value));
                    mbInfo = Convert.ToString(propData.Value);
                    break;
                }
            }
            return mbInfo;
        }
        static private string GetCpuID()
        {
            string cpuInfo = string.Empty;
            ManagementClass mc = new ManagementClass("win32_processor");
            ManagementObjectCollection moc = mc.GetInstances();

            foreach (ManagementObject mo in moc)
            {
                if (cpuInfo == "")
                {
                    //Get only the first CPU's ID
                    cpuInfo = mo.Properties["processorID"].Value.ToString();
                    break;
                }
            }
            return cpuInfo;
        }

        public static string ComputerSID
        {
            get
            {
                string sid = string.Empty;
                string SIDKey = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion";

                RegistryKey baseKey = null;
                if (Environment.Is64BitOperatingSystem)
                {
                    baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
                }
                else
                {
                    baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default);
                }

                RegistryKey key = baseKey.OpenSubKey(SIDKey);

                object keyValue = key.GetValue("ProductId");

                if (keyValue != null)
                {
                    sid = keyValue.ToString();
                }

                key = null;
                keyValue = null;

                return sid;
            }
        }
        public static string UUID
        {
            get
            {
                string uuid = string.Empty;

                ManagementClass mc = new ManagementClass("Win32_ComputerSystemProduct");
                ManagementObjectCollection moc = mc.GetInstances();

                foreach (ManagementObject mo in moc)
                {
                    uuid = mo.Properties["UUID"].Value.ToString();
                    break;
                }

                return uuid;
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            label1.Text = GetMotherBoardID();
            label2.Text = GetCpuID();
            label3.Text = ComputerSID;
            label4.Text = UUID;
        }

    }

...
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.


PDS
Á¦¸ñPage 73/77
2014-05   4876406   Á¤ÀºÁØ1
2015-12   1415519   ¹é¸Þ°¡
2020-03   4512   µö·¯´×¼­¹ö
2020-08   4511   Á¦°¥±âõ
2020-09   4504   ¾È°³¼Ó¿µ¿ø
04-01   4501   °ú¹¬Çѳë¼÷ÀÚ
2019-08   4492   µö·¯´×¼­¹ö
2019-09   4477   µö·¯´×¼­¹ö
2019-10   4452   µö·¯´×¼­¹ö
2020-11   4450   pilsuni
2023-11   4428   AKMU
2020-09   4402   ÆÄÇÇǪÆä
02-14   4390   ¾î¸¥ÀÌ
2019-10   4376   µö·¯´×¼­¹ö
2020-09   4354   Â÷³ÝÄÄÇ»ÅÍ
2020-05   4330   µö·¯´×¼­¹ö
2020-09   4315   ÇöÁø
2019-08   4303   »ßµ¹À̽½ÇÄÀÌ
2022-02   4291   È­Á¤Å¥»ï
2023-11   4257   TheSTREET
2019-10   4235   µö·¯´×¼­¹ö
2019-07   4227   µö·¯´×¼­¹ö