WMI "Invalid class" error

Description

If you launch MS Outlook and eWay-CRM, this error will occur:

System.Management.ManagementException: Invalid class
   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext() 
   at eWay.Core.WmiWrapper.ProcessManagement.ApplyToProcesses(String processName, String filter, ProcessHandler iterator)
   at eWay.Core.WmiWrapper.ProcessManagement.GetMainWindowHandle(String processName)
   at eWay.Core.WindowWrapper..ctor(String processName)
   at eWay.Applications.Agent.MainClass.EnableOutlookToolbar()
   at eWay.Applications.Agent.MainClass.FinalizeInitialization()
   at eWay.Applications.Agent.MainClass.b__4(Object )
   at System.Threading._TimerCallback.TimerCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading._TimerCallback.PerformTimerCallback(Object state)

The same error may appear when you try to upgrade eWay-CRM:

Error while executing background operation.
System.Management.ManagementException: Invalid class 
   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
   at eWay.Core.WmiWrapper.ProcessManagement.ApplyToProcesses(String processName, String filter, ProcessHandler iterator)
   at eWay.Core.WmiWrapper.ProcessManagement.CloseApplication(String name, String filter, Nullable`1 waitInterval)
   at ClientUpdater.Notificator.StartUpdateAndWait(Object argument)
   at eWay.Core.GUI.Common.Dialogs.ProgressDialog.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)

Version

All versions of eWay-CRM

Difficulty

High

Resolution

This is an error of the WMI component.

Some diagnostics might be done using WMIDiag tool, but it was deprecated by Microsoft and is no longer available for download.

There is no database of solutions for specific errors. The recommended solution is to reinstall the operating system. Nevertheless, you can execute some repairs that helped other users. You can find the list of repairs here.