Retrieving the COM class factory for component with CLSID. Failed due to the following error: 80080005.

Error:

Retrieving the COM class factory for component with CLSID.

Failed due to the following error: 80080005.

Snapshot:

Workaround1:

In VS – project properties – in the Build tab – platform target =X86

Workaround2:

  1. Open Command prompt as Administrator
  2. type Regsvr32 /u vbscript.DLL.
  3. Click enter to unregister.
  4. type Regsvr32 vbscript.DLL.
  5. Click enter to register it.