In this document it will be explained how to resolve the Invalid Class Error.

You can try to resolve the Invalid Class Error with 4 different methods.

 

Method 1:

This problem may be caused by the Windows Management Instrumentation (WMI) service not being started, being corrupted or disabled.

To check if the WMI service is started;

Enter Windows Start > Services > Services Application > Windows Management Instrumentation service.

If the service is stopped, right click on the service and start it. Then, you can try to start SambaPOS.

 

 

Method 2:

If the services are already started, the problem may be caused by a corrupted Windows Management Instrumentation (WMI) service.

To test this, start System Information and check if the message Unable to Collect Information appears.

If the message appears, you will need to repair the WMI services.

– First, right-click on the WMI service and stop it by doing the reverse of Step 1.

– Then, rename the Repository folder located in C:\Windows\system32\wbem\repository to repository_old
This will back up the old file and create a new one.

– Restart the WMI service and check if System Information is working properly. Then you can try starting SambaPOS.

 

 

Method 3:

If the first two steps do not work:

-Type %SystemRoot%\System32\Wbem into Windows Explorer.

-Reset the WinMgmt.CFG file in the folder by deleting or renaming it.

 

 

-In the System Configuration Utility (Start > Run, type MSCONFIG).

In the Services tab, check the Windows Management Instrumentation/WMI services to make sure they are running.

-Restart the computer to recreate the CFG. Then try to start SambaPOS.

 

 

Method 4:

-If the problem persists after the first 3 steps, the problem may be in the Windows Management Instrumentation files.

We are using the CMD command prompt to fix the files.

-Open the CMD Prompt as Administrator and copy and paste to the folder: cd C:\windows\system32\wbem

-Copy the following lines in the same way and paste them to the window and wait for the system to finish. It may take 1-2 minutes.

regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
regsvr32 cimwin32.dll
mofcomp cimwin32.mof
mofcomp cimwin32.mfl
mofcomp rsop.mof
mofcomp rsop.mfl
for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
for /f %s in (‘dir /b *.mof’) do mofcomp %s
for /f %s in (‘dir /b *.mfl’) do mofcomp %s
regsvr32 wmisvc.dll
wmiprvse /regserver