Device Manager Code 40: Repair Missing Driver Service Information in Windows

Save the device details → Reinstall the device → Check the new entry. Diagnostic sequence for Windows Device Manager Code 40 service key missing.

Code 40 means Windows cannot use the service information registered for this device’s driver. Microsoft recommends reinstalling the device. A registry entry copied from another PC may refer to a different driver build or hardware revision.

1. Save the device details

On Windows 10 or 11 right-click Start and open Device Manager. Confirm the full Code 40 message under General. Record the Driver provider and version, then identify the device on Details > Hardware Ids. Download the supported package for that hardware before taking it offline.

2. Reinstall the device

For a replaceable peripheral, close its applications and choose Uninstall device on the affected entry alone. Leave any option to remove the driver package unchecked for this first test. Select the computer name and choose Action > Scan for hardware changes. Follow the setup prompts and supply the manufacturer package if Windows needs it.

3. Check the new entry

Restart if requested, reopen the entry and confirm the current device status. Check the Driver tab to see which package Windows selected. Run a task that previously failed, then reconnect the peripheral once to confirm that registration survives detection.

Worked example

A USB document camera stops opening after its old software is removed. The camera still appears with Code 40. Redetection followed by the maker’s installer restores its entry, and the camera displays a live image again after reconnecting.

If the retest fails

If the error returns after every restart, save the installation event times and package version for support. For storage controllers or the only active network connection on a remote PC, use the system maker’s supported repair procedure before uninstalling the device.

See Microsoft’s Device Manager error codes and recommended fixes. For help with reading the order of driver installation events, see our related Windows guide. Browse the Windows Drivers directory for more devices.