上面这几句报的错,怎样解决啊?程序本来运行好好的,现在报下面的错误(其他电脑上没有问题)
************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80070433): 服务不存在,或已被标记为删除。 (Exception from HRESULT: 0x80070433) at System.Management.ThreadDispatch.Start() at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at MedicalFornt_Data.Data.GetSerialPort() in e:\项目\MedicaFornt_Data\MedicaFornt_Data\Data.cs:line 912 at MedicalFornt_Data.Data.StartReceive() in e:\项目\MedicaFornt_Data\MedicaFornt_Data\Data.cs:line 61 at MedicalFornt_Data.Data.Form1_Load(Object sender, EventArgs e) in e:\项目\MedicaFornt_Data\MedicaFornt_Data\Data.cs:line 55 at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at MedicalFornt_Data.Data.WndProc(Message& m) in e:\项目\MedicaFornt_Data\MedicaFornt_Data\Data.cs:line 748 at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
重装系统!
重新装下.net框架试试,如果不行重新装系统吧
没有安装 WMI 或者安装不正确,重新安装一次。