mgmtScope = new ManagementScope("\\\\" + strHostAddress + "\\" + WMIConnection.dictWMINamespace[nameSpace] + "", connOptions); string WMITimeOut = ConfigurationManager.AppSettings["WMIConnectionTimeout"]; TimeSpan wmiTimeOutts; int value; if (int.TryParse(WMITimeOut, out value)) { wmiTimeOutts = new TimeSpan(0, 0, value); } else { wmiTimeOutts = new TimeSpan(0, 0, 60); } mgmtScope.Options.Timeout = wmiTimeOutts; mgmtScope.Connect();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)