c#程序在部分电脑运行异常解决方法(System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务)
异常内容如下:
System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务,原因可能是已被禁用或与其相关联的设备没有启动。 (异常来自 HRESULT:0x80070422)
在 System.Management.ThreadDispatch.Start()
在 System.Management.ManagementScope.Initialize()
在 System.Management.ManagementObjectSearcher.Initialize()
在 System.Management.ManagementObjectSearcher.Get()
。。。
解决方法:
(1)在开始--》运行中输入services.msc
(2)找到Windows Management Instrumentation服务
(3)鼠标右键打开属性,选择启动类型为【自动】,并开启服务即可
如果执行以上步骤之后,提示“Windows无法启动Windows Management Instrumentation服务(位于 本地计算机上)。错误1075:服务不存在,或已被标记为删除”
则按照接下来这篇文章试着解决一下:http://blog.youkuaiyun.com/xys_777/article/details/5718096/