void InfoRead() { try { //RegistryKey mykey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\Microsoft\Windows\CurrentVersion\OEMInformation", true); using (var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)) using (var mykey = hklm.OpenSubKey(@"SOFTWARE\\Microsoft\Windows\CurrentVersion\OEMInformation")) { txbManf.Text = mykey.GetValue("Manufacturer").ToString(); txbManf.Text = mykey.GetValue("Manufacturer").ToString(); txbModel.Text = mykey.GetValue("Model").ToString(); txbSupUrl.Text = mykey.GetValue("SupportURL").ToString(); txbSupHours.Text = mykey.GetValue("SupportHours").ToString(); txbSupPhone.Text = mykey.GetValue("SupportPhone").ToString(); if (mykey.GetValue("Logo").ToString() == "") { } else { OEMLogo.Load(mykey.GetValue("Logo").ToString()); } } } catch { return; } }
private void BtnLoad_Click(object sender, EventArgs e) { fd.Title = "Select the patch of image"; fd.Filter = "Images Only|*.bmp*"; if (fd.ShowDialog() == DialogResult.OK) { OEMLogo.Load(fd.FileName); imgsrc = fd.FileName.ToString(); File.Copy(fd.FileName, @"C:\Windows\OEM\Logo.png", true); } }