How to Fix Code 45 in Windows 10 Device Manager

Code 45 in Device Manager means “Currently, this hardware device is not connected to the computer.” Windows remembers a device that was plugged in before but can’t see it now. Usually the fix is simply to reconnect the device. If it’s already connected, or the device is gone for good, remove the hidden entry in Device Manager and let Windows detect the hardware again.

Windows 10 reached end of support on October 14, 2025. Consumer Extended Security Updates (ESU) now run until October 12, 2027. The same fixes work on Windows 11.

Quick Answer

Reconnect the device. If Code 45 remains, open Device Manager > View > Show hidden devices, right-click the grayed-out device > Uninstall device, then reconnect and choose Action > Scan for hardware changes.

Fix 1: Reconnect the Device

  1. Unplug the device, wait a few seconds, and plug it back in.
  2. Try a different port, cable, or a port directly on the PC instead of a hub.
  3. For internal devices, restart the PC. A full shutdown (hold Shift while clicking Shut down) can help.

Fix 2: Remove the Hidden Device Entry

  1. Right-click Start and open Device Manager.
  2. Click View > Show hidden devices. Disconnected devices appear grayed out.
  3. Right-click the grayed-out device showing Code 45 and choose Uninstall device.
  4. Reconnect the device, then click Action > Scan for hardware changes.
Device properties dialog showing device status Code 45, hardware not connected
Code 45 appears on the device’s General tab.

Fix 3: Update Windows and Drivers

  • Install updates in Settings > Update & Security > Windows Update, including Optional updates for drivers.
  • Download the driver from the device or PC maker’s official site if Windows doesn’t find one.

Fix 4: Repair System Files

Open Command Prompt as administrator and run sfc /scannow. If it reports problems it can’t fix, run DISM /Online /Cleanup-Image /RestoreHealth, then sfc again and restart.

What Code 45 Usually Means

Situation What to do
Device unplugged on purpose Nothing; the message is expected
Device plugged in but shows Code 45 Try another port or cable; remove the hidden entry
Internal device (card reader, webcam) Check it’s enabled in firmware settings and not turned off by a keyboard key or privacy switch
Keeps coming back The device or cable may be failing

After fixing drivers in Safe Mode, learn how to get out of Safe Mode.

For other errors, see how to check for corrupt drivers.

Troubleshooting

Frequently Asked Questions

Is Code 45 serious?

Usually not. It just means Windows can’t currently see the device.

Will uninstalling the device delete my files?

No. It only removes the driver entry. Windows reinstalls it when the device reconnects.

Summary

  1. Reconnect the device or try another port.
  2. Show hidden devices and uninstall the grayed-out entry.
  3. Scan for hardware changes and update drivers.
  4. Run sfc and DISM if problems continue.