0X80040165

CS_E_NOT_DELETABLE (0X80040165) – COM+ catalog corruption fix

Windows Errors Intermediate 👁 1 views 📅 May 29, 2026

You get this error when trying to delete a COM+ application or component. The catalog thinks the object is still in use or locked. Real fix: force delete from the registry.

You're in Component Services (dcomcnfg), right-click a COM+ application, hit Delete, and get the dialog: "CS_E_NOT_DELETABLE (0X80040165)". Happens most often after uninstalling a piece of software that registered its own COM+ components—some installers leave dead catalog entries behind. I've seen it with old versions of SQL Server, IIS extensions, and custom .NET serviced components. The COM+ catalog thinks the object is still referenced by something, but in reality the reference is orphaned garbage.

Why the catalog refuses to delete

The COM+ catalog stores applications and components in a database (the COM+ catalog, stored in %windir%\Registration\*.clb files and registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3). When you delete through the UI, COM+ calls ICatalogObject::Delete on the object. Before deleting, the catalog checks for active references—like running objects, pending transactions, or other components that depend on it. What's actually happening here is the catalog's reference count got out of sync. The component is dead, but the count never decremented, so the catalog refuses the delete.

The reason the UI fix fails: Component Services tries to be safe. It won't force-delete anything that might be in use. You need to go around it.

Fix: Force delete from the registry

Skip the UI entirely. We're going to remove the dead catalog entry directly. This works on Windows 10, 11, Server 2016, 2019, and 2022.

  1. Back up the COM+ catalog first. Open Command Prompt as Admin, run:
    reg export HKLM\SOFTWARE\Microsoft\COM3 com3_backup.reg
    Don't skip this. If you nuke the wrong key, you can restore.
  2. Identify the application GUID. In Component Services, expand Component Services > Computers > My Computer > COM+ Applications. Right-click the stubborn app, select Properties. On the General tab, you'll see the Application ID (a GUID like {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}). Write it down.
  3. Find the catalog entry. Open Regedit. Navigate to:
    HKLM\SOFTWARE\Microsoft\COM3\Applications\
    Look for a subkey matching your GUID. If you see it, great. If you don't see it, the problem lives in the CLB file store—that's a different fix, but rare. 90% of cases the key is right there.
  4. Remove the key. Right-click the GUID key, delete it. Confirm.
  5. Restart COM+ System Application service. Open Services.msc, find "COM+ System Application", right-click, Restart. This forces the catalog to reload from disk.
  6. Check Component Services. The app should be gone. If it's still listed, right-click the top-level "COM+ Applications" node and select Refresh.

Still there? Harder cases

If the registry key doesn't exist, the corrupt entry is in the CLB files. That's a bigger pain. You can try a tool called comadmin.dll script: create a VBS file with:

Set catalog = CreateObject("COMAdmin.COMAdminCatalog")
Set applications = catalog.GetCollection("Applications")
applications.Populate
For Each app In applications
  If app.Name = "YourAppName" Then
    applications.Remove app
    applications.SaveChanges
  End If
Next

Run it with cscript delete_com.vbs from an elevated prompt. But honestly, if the registry key was missing and this script fails, you're looking at a catalog rebuild. The nuclear option: delete the entire COM3 key and recreate it from a known-good backup. That's extreme—only do that if you're on a dev machine or have the original software ready to reinstall.

One more thing: sometimes the COM+ application was installed by a service that's still running. Check Task Manager for any process with the app's name, or use tasklist /m to see loaded DLLs. Kill the process, then retry the registry delete.

Was this solution helpful?