i want to use ProductId of windows machine so i have written this code but this code is unable to get the ProductId from the registry when running on windows server 2008 when i have visited registry the ProductId is there in Registry
string[] names = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValueNames();
foreach (string s in names)
{
listBox1.Items.Add(s);
}