private string GetBrandModel()
{
//获取64位
Microsoft.Win32.RegistryKey localMachine64 = Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry64);
Microsoft.Win32.RegistryKey key = localMachine64.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation");
string Model = "";
string Manufacturer = "";
if (key != null)
{
object manufacturer = key.GetValue("Manufacturer");//系统制造商
if (manufacturer != null)
{
Manufacturer = manufacturer.ToString();
}
object model = key.GetValue("Model");//型号
if (model != null)
{
Model = model.ToString();
}
}
string BrandModel = Manufacturer + (Manufacturer == "" ? "" : " ") + Model;
return BrandModel;
}