0
votes

If i run the PowerShell script from a .bat file mannually it is working fine.

Same Script calling from .Bat file in c#, getting below error:

"Exception: Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."

Please help me.

1
Have you built your project against 64-bit environment and tried to run it on 32bit machine?npocmaka
No, I haven't built.Jethij

1 Answers

0
votes

The COM component can be uninstalled,unregistered or corrupted. Install/Repair it or register it using Regsvr32.

If reinstalling it repairing the component doesn't work then verify all of your assemblies are compiled in correct architecture. You may be running the project in x64 environment but executed in x86 environment or vice versa (As @npocmaka pointed). Try changing the architecture to x86/x64.

If you are running it as x64 web app in IIS then verify app pool is not set to allow x86 applications.