Windows OS

6 Fixes for Hardware Device is Not Connected (Code 45) Error

The “Hardware device is not connected (Code 45)” error appears whenever Windows does not recognize the connected peripheral devices such as a mouse, Bluetooth, keyboard, or USB storage device. The main causes of the stated error could be corrupt system files, outdated drivers, or faulty hardware. If you are also experiencing the stated issue, then follow our post.

This write-up will overview the methods to fix the mentioned error.

How to Fix Hardware Device is Not Connected (Code 45) Error?

The stated error can be fixed by using these methods:

Let’s explore each of the methods one by one!

Fix 1: Reconnect the Faulty Device

Sometimes, when devices are loosely connected, they cause problems. So, reconnecting that device will result in fixing the problem. If the specified solution did not fix it, then follow the other provided methods.

Fix 2: Run DISM Scan

The “Hardware device is not connected (Code 45)” error can also be rectified by running a DISM scan, as it assists in repairing the Windows image files. For that reason, follow the steps below.

Step 1: Launch CMD

Firstly, launch “Command Prompt” via the Start menu:

Step 2: Run the Scan

Execute the below-given command to run the DISM scan:

>DISM /Online /Cleanup-Image /RestoreHealth

The given output indicates that the restore operation has been completed successfully.

Fix 3: Repair System Files

SFC is an acronym for “System File Checker” used to repair corrupt and missing system files. More specifically, running the SFC scan can resolve the stated problem.

For that purpose, first, launch “Command Prompt” via the Start menu and run the command to start the scan:

>sfc /scannow

System files have been repaired successfully. Now, examine whether the hardware device not connected problem got fixed or not.

Fix 4: Run CHKDSK Scan

The Check disk utility feature is utilized to overview and rectify errors on the disk. The mentioned error can be fixed by running a CHKDSK scan. For that reason, run the following command:

> chkdsk C: /f /r /x

Type “Y” when asked to start the scan on the next restart if the drive is in use by another process at the moment.

Fix 5: Run Hardware Troubleshooter

Hardware troubleshooting is used to deal with hardware-related problems. For that reason, go through the given instructions.

Step 1: Launch Run

First, launch the “Run box” via the Start menu:

Step 2: Launch Hardware and Devices

Type “msdt.exe -id DeviceDiagnostic” and hit the “OK” button:

Step 3: Run the Troubleshooter

Click on the “Next” button:

The hardware troubleshooter has begun to troubleshoot hardware errors:

After doing so, the attached hardware device will be detected by the system.

Fix 6: Update Windows

Finally, if all the above methods failed to resolve the mentioned error, then updating Windows is the final solution.

Step 1: Open Windows Update Settings

First, open “Check for updates” via the Start menu:

Step 2: Update Windows

Select the “Install now” button:

As you can see, Windows has started to update:

After updating Windows, examine if the hardware device is not connected (code 45) problem got fixed or not.

Conclusion

The “Hardware device is not connected (Code 45)” error can be fixed by using several methods, such as reconnecting the faulty device, running a DISM scan, repairing system files, running the CHKDSK scan, running a hardware troubleshooter, or updating Windows. This blog has demonstrated the practical ways to fix the specified error.

About the author

Muhammad Farhan

I am a Computer Science graduate and now a technical writer who loves to provide the easiest solutions to the most difficult problems related to Windows, Linux, and Web designing. My love for Computer Science emerges every day because of its ease in our everyday life.