public bool Exists() { try { wmisession.GetValue(name); return(true); } catch (ManagementException me) { if (me.ErrorCode == ManagementStatus.AccessDenied) { throw; } return(false); } catch { return(false); } }