I want to get unique unchangeable Machine id Like Processor serial number of the computer for distribute a software with out copying.
I tried with processor serial number and hard disk serial number that all are changing after formatting and reinstalling the windows.
Any idea how i can get an unchangeable serial number of a computer?
On WindowsGo to the Start menu, then in the search box type “cmd” and hit Enter. In the cmd window, type “ipconfig /all”. Find the line that reads “Physical Address”. This is your Machine ID.
The /etc/machine-id file contains the unique machine ID of the local system that is set during installation or boot. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase ID. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit value. This ID may not be all zeros.
Each device in Windows has it's own unique identifier known as the Hardware ID. The Device ID is the identifier of the PC itself.
DESCRIPTION. The /etc/machine-id file contains the unique machine ID of the local system that is set during installation. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase machine ID string. When decoded from hexadecimal, this corresponds with a 16-byte/128-bit string.
Maybe the easiest way is. Get the DeviceId Nuget package
And use it like
string deviceId = new DeviceIdBuilder() .AddMachineName() .AddMacAddress() .AddProcessorId() .AddMotherboardSerialNumber() .ToString();
You can personalize the info used to generate the ID
Github Project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With