private void ShowSysInfo()
{
var strSysInfoPath = "";
strSysInfoPath = RegistryHklmValue(@"SOFTWARE\Microsoft\Shared Tools Location", "MSINFO");
if (strSysInfoPath == "")
{
strSysInfoPath = RegistryHklmValue(@"SOFTWARE\Microsoft\Shared Tools\MSINFO", "PATH");
}
if (strSysInfoPath == "")
{
MessageBox.Show("System Information is unavailable at this time." +
Environment.NewLine +
Environment.NewLine +
"(couldn't find path for Microsoft System Information Tool in the registry.)",
Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
try
{
Process.Start(strSysInfoPath);
}
catch (Exception)
{
MessageBox.Show("System Information is unavailable at this time." +
Environment.NewLine +
Environment.NewLine +
"(couldn't launch '" + strSysInfoPath + "')",
Text, MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}