Computer

End error 45 in Windows by connecting a USB device

When we connect any hardware device to our computer, the error Code 45 may surprise us with the following message: «Currently, this hardware device is not connected to the computer. To fix the problem, reconnect this hardware device to the computer. ‘ If this is our case, although it is a rather annoying problem, we should not worry excessively because there are different ways to solve it. For this, we are going to see what may be causing this failure and how to fix it.

Why do I get the Code 45 error?

We can connect all kinds of peripheral devices to our computer through the USB port such as a webcam, a printer, a keyboard, a mouse, etc. In doing so, it may be the case that the error code 45, which applies to all versions of the Microsoft operating system from Windows XP to Windows 11. This appears and can block the window of the currently active program, as well as make the system move more slowly or even It blocks for a few seconds, making it impossible for us to continue using it correctly.

This failure usually appears mainly when the system cannot communicate with a device that we have connected via USB connection, so it can be solved by reconnecting it. However, the fault may persist even after disconnecting and reconnecting. And it may also have been caused by Windows registry keys that are damaged when making a recent change, drivers that are damaged or simply that the hardware is defective.

Whatever the origin of the failure, the truth is that it is something tremendously annoying, so we can try to end it through a series of actions that we can perform from the operating system itself.

Steps to fix the fault

Next, we are going to tell about different ways we have to address the problem with the appearance of this error code 45 from the Device Manager.

Update windows

Our system may not be able to recognize the connected hardware device because it requires an update. Keeping Windows updated allows us to internally fix possible problems or errors like this one. To update the system we must press the “Windows + I” key combination to access the “Configuration” section. Then we click on “Update and security”.

Pending updates from Windows Update

In the new window, we select the Windows Update option in the left pane and click Check for updates. The system will look for an available update and if it finds it, it will proceed to install it. Once complete, we restart the computer, connect the problem hardware device and check if the error has been resolved.

Hardware troubleshooter

Windows has its own troubleshooter, a built-in tool that can help us solve hardware errors from a command line, so it can become the appropriate remedy. To do this we will launch the Run tool using the Windows + R keyboard shortcut. Here we will write the following command and press Enter.

msdt.exe -id DeviceDiagnostic

Later, the troubleshooter window will appear, so we will have to click on «Next» for the operating system to carry out the search for possible problems in order to remedy them. Once its work is finished, a detailed report of the results obtained will appear.

Update or remove drivers

As we have commented, one of the reasons why the Code 45 error may appear is because the drivers are damaged, so we can try to update them. To do this, we access the Device Manager by pressing the keyboard shortcut “Windows + X”. then we click on the category of the affected device (keyboard, mouse, etc.) to expand it. Right-click on the affected driver and select “Update Driver.” Finally, we indicate that Windows search for it automatically.

Update mouse drivers

In case it does not work, we can try to click on “Uninstall driver”. Later we restart the PC and when Windows starts it will install the missing drivers again, so this should put an end to the problem.

Check the status of the hard drive

Another option that we can try is to perform a checkdisk to the system in order to be able to verify if there is damage to our hard drive that has caused the appearance of the Code 45 error. To do this, it will be necessary to access the Command Prompt, by typing cmd in the search box of the Start menu. Once located we must click on Run as administrator. Later we write the following command and press Enter:

chdsk C: /f

Keep in mind that C: corresponds to the letter of the drive that we want to analyze. Also, the / f parameter causes the command fix all detected errors automatically. Now we can only wait for the process to finish to check if the error has been corrected.

Repair the PC registry

Windows has a tool called SFC (System File Checker) developed to check the status of system files, in order to detect any damage or errors and try to solve them. To run it, we access the Command Prompt with administrator rights. Later we write the following command and press Enter:

sfc /scannow

Run SFC on Windows

Now we just have to wait for the scanning process to be completed, which can take a long time so we must be patient. Once finished, it will show us a report with the actions carried out. We close the window and restart the computer so that all the damaged files are replaced.

We can also use the tool DISM (Deployment Image Servicing and Management) that will help us to correct system errors. To do this, from the Command Prompt we write the following command and press Enter:

DISM / Online / Cleanup-Image / RestoreHealth

It is also a long process that can take up to 20 minutes. Once finished, we restart the PC and access the Device Manager again to verify that the error code 45 has been corrected.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *