Class not registered error

I have a PS script that I inherited, and that used to work fine (arrrrgg), so this may be naive question. Running W11 on a recently purchased machine. Have the most recent version of Powershell.

The script starts off with

$penrequest = new-object -comobject Anoto.ServiceAPI.PenRequest
$file = new-object -comobject AnotoUtil.File

The Anoto.ServiceAPI is installed, as shown in the Registry:

Anoto.ServiceAPI.PenRequest.1
CLSID REG_SZ {38990EBA-D016-4797-AFA4-2A9BC7E70648}

It worked fine a few months ago, Yet when I try to run it now, I get:

new-object : Retrieving the COM class factory for component with CLSID {38990EBA-D016-4797-AFA4-2A9BC7E70648} failed
due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At C:\ClockSketch Downloader Service\ConvertTrailsTests.ps1:4 char:19

  • $penrequest = new-object -comobject Anoto.ServiceAPI.PenRequest
    
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceUnavailable: (:slight_smile: [New-Object], COMException
    • FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand

Have I missed something in the installation? I thought I had done what I did previously, and the CLSID is indeed the registry.

If the problem is “Class not registered”, how do I register it, and what class?

Many thanks for any guidance.

Could it be a 32/64-bit issue - as in is the DLL you installed 32-bit and you’re running 64-bit PowerShell (default on Win11)? If so, make sure to get the 64-bit installer for your Anoto DLL.

If your powershell is “running as admin” try a non elevated session. If it’s not running as admin, try running as admin and see if you’re able to instantiate an instance.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.