1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
string _strOS="";
RegistryKey _rootKey = Registry.LocalMachine;
string _subKey = @"HARDWARE\DESCRIPTION\System\CentralProcessor\0";
RegistryKey _key = _rootKey.OpenSubKey(_subKey);
string _procName = (string)_key.GetValue("Identifier", "");
string[] _values = _procName.Split(new char[] { '' '' }, 2);
if (_values.Length >= 1)
{
if (string.Compare(_values[0], "x86", true) == 0)
{
_strOS += "(32bit)";
}
else
{
_strOS += "(64bit)";
}
}
|