Reputation: 557
As you can see, it has 2 "Hardware-Identity" values that could be very useful in applications like C# for license validating. Is it possible to find these values/compute them manually?
Is it possible it's stored in Registry and is it only for Windows 10?
This is windows Version 1709 Build 16299.15.
Upvotes: 27
Views: 61644
Reputation: 29
for "Product ID" you can use wmic
cmd com:
wmic os get serialnumber
C# code:
private string get_com_cmd(string com)
{
var processInfo = new ProcessStartInfo("cmd.exe", "/c "+com)
{
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
WorkingDirectory = @"C:\Windows\System32\"
};
StringBuilder sb = new StringBuilder();
Process p = Process.Start(processInfo);
p.OutputDataReceived += (sender, args_) => sb.AppendLine(args_.Data);
p.BeginOutputReadLine();
p.WaitForExit();
return sb.ToString();
}
the call:
Console.WriteLine(get_com_cmd("wmic os get serialnumber"));
EX cmd output enter image description here
for "Device ID" you can use reg query in cmd or open registry editor by typing the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient your device id in (MachineId) name.
useing cmd by typing
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient /v MachineId
Upvotes: 2
Reputation: 426
The Device ID (Advertising ID) is a distinctive number associated with a device. This number is important for technicians and engineers when trying to find solutions to ongoing issues. And it will change if you reset or install new Windows.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient
The Product ID is the number associated with your particular operating system. It may change if you install cracked Windows or active Windows with Third-Party activation software.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
Upvotes: 18