Jul 29, 2011

how to read binary value from registry in c#.net


 private void button6_Click(object sender, EventArgs e)
        {
           

            string uninstallKey = @"Software\Microsoft\Windows NT\CurrentVersion";
            RegistryKey r = Registry.LocalMachine.OpenSubKey(uninstallKey);
            byte[] val = (byte[])r.GetValue("DigitalProductId");
           
     string output = "";
    foreach(byte b in val)
   {
       //MessageBox.Show(b.ToString());
   output +=b;
   output += " ";
  }
    MessageBox.Show(output);
   
            }



o/p






No comments:

Post a Comment