//get Windows OS Key byte[] id = null; var regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"); if (regKey != null) { id = regKey.GetValue("DigitalProductId") as byte[]; inv_oslicenseTB.Text = id.ToString();
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node--> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node--> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS> <!-- If your application is designed to work with Windows 8.1, uncomment the following supportedOS node--> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)