Is there some uniqueID of each computer, to differentiate one from other?

后端 未结 4 1955
抹茶落季
抹茶落季 2021-01-23 00:15

I am developing a windows application in .NET Framework using C#.I want to know is there any Unique Id of each computer manufactured, let it be manufactured by any manufactrure

4条回答
  •  盖世英雄少女心
    2021-01-23 01:01

    Check this : How to get the Computer's Unique ID

    Hard Drive ID (Volume Serial)

    Finding a unique volume serial works very similarly and luckily a bit simplier:

    ManagementObject dsk = new ManagementObject(@"win32_logicaldisk.deviceid=""" + drive + @":""");
    dsk.Get();
    string volumeSerial = dsk["VolumeSerialNumber"].ToString();
    

提交回复
热议问题