private string GetArchitecture(WmiObject wmiObject)
 {
     string systemType = wmiObject.GetValueOf("SystemType").ToString();
     switch (systemType)
     {
         case "X86-based PC":
         case "X86-Nec98 PC":
             systemType = "INTEL32";
             break;
         case "MIPS-based PC":
             systemType = "MIPS";
             break;
         case "Alpha-based PC":
             systemType = "ALPHA32";
             break;
         case "Power PC":
             systemType = "POWERPC32";
             break;
         case "SH-x PC":
             systemType = "SUPERH";
             break;
         case "StrongARM PC":
             systemType = "STRONGARM";
             break;
         case "64-bit Intel PC":
             systemType = "INTEL64";
             break;
         case "64-bit Alpha PC":
             systemType = "ALPHA64";
             break;
         default:
             systemType = "UNKNOWN";
             break;
     }
     return systemType;
 }
 /// <summary>
 /// Gets the name of the system.
 /// </summary>
 /// <param name="wmiObject">The WMI object.</param>
 /// <returns></returns>
 private string GetSystemName(WmiObject wmiObject)
 {
     string osName = wmiObject.GetValueOf("Name").ToString();
     osName = osName.Split('|')[0].Trim();
     osName = osName.Replace("®", "");
     osName = osName.Replace("™", "");
     ushort spmajor = (ushort)wmiObject.GetValueOf("ServicePackMajorVersion");
     ushort spminor = (ushort)wmiObject.GetValueOf("ServicePackMinorVersion");
     if (spmajor > 0)
     {
         osName += " SP" + spmajor.ToString();
         if (spminor > 0)
             osName += "." + spminor.ToString();
     }
     return osName;
 }
        /// <summary>
        /// Return the name of host name concatenated with the domain name.
        /// </summary>
        /// <param name="wmiObject">The WMI object.</param>
        /// <returns></returns>
        private string GetHostName(WmiObject wmiObject)
        {
            string hostName = wmiObject.GetFieldValueAsString("DNSHostName").ToLower();
            if (string.IsNullOrEmpty(hostName))
                hostName = wmiObject.GetFieldValueAsString("Name").ToLower();

            object partOfDomain = wmiObject.GetValueOf("PartOfDomain");
            if ((partOfDomain != null) && ((bool)partOfDomain))
            {
                hostName += "." + wmiObject.GetFieldValueAsString("Domain");
            }

            return hostName;
        }