Device Manager Code 40 — Windows Cannot Access This Hardware (Service Key Missing)

Short answer: Windows cannot access this hardware because its service key information in the registry is missing or recorded incorrectly.
CodeCode 40
Applies toWindows device (any brand)
SeverityUser-fixable
Most common causeThe driver's registry service key was deleted or its values damaged (registry cleaners, failed installs)

What this code means

Code 40: 'Windows cannot access this hardware because its service key information in the registry is missing or recorded incorrectly.' Every driver registers a service key in the registry — where its files live, how it starts, what it depends on. If that key is missing or its values are wrong, Windows cannot even begin to load the driver.

It is a close cousin of Code 19 (damaged device configuration), but here the damage is specifically in the driver's service registration — and the clean fix is the same: let the manufacturer's installer write it again.

Likely causes

How to fix it — step by step

  1. Reinstall the manufacturer's driver

    Uninstall the device in Device Manager (tick 'Attempt to remove the driver'), restart, and install the manufacturer's current package for your exact model. The installer rewrites the service key.

  2. Undo registry cleaning if it just happened

    If a registry cleaner ran just before Code 40 appeared, use its built-in restore (or System Restore) to roll back the cleaning, then reinstall the driver.

If the code comes back after these steps, treat it as a hardware or service fault rather than a settings problem — that is the honest end of software troubleshooting for this code.

Is it a driver problem?

Yes. Yes — the missing information is the driver's own service registration. Reinstalling the manufacturer's driver recreates the service key with correct values, which is why reinstall is the whole fix.

Get the official driver or support for your device

If a fix above points you at a driver, get it from the manufacturer only:

Microsoft Support — Update drivers manually in Windows Opens support.microsoft.com

Printer, laptop or PC drivers by brand: HP · Dell · Lenovo · Acer · ASUS · Canon · Epson · Brother · Samsung printers

Related errors

Verified 2026-11-28 against: support.microsoft.com · www.pugetsystems.com. Meanings follow the manufacturers' and Microsoft's published documentation; where a code's meaning depends on the exact model, the page says so.