Automate windows scan for hardware changes?

I have a windows 10 laptop (only a couple of years old) and an older printer (HP LaserJet 1320) that is not wireless. I often wander with my laptop, hooking up the printer only when I need to print. Most of the time I need to manually scan for hardware changes. I would like to create a shortcut (command line, bat file, or some other, better solution) to perform this task to make it easier for my less tech-savvy family members. Ideally, I would like to be able to connect/disconnect the printer at will and have it work without any manual intervention, but I'll take what i can get.

1 Answer

From my research its best to use DevCon to do a hardware scan, please see below:

Download Windows Driver Kit -

Link was obtained from this page ()

Install the Windows Driver Kit, at end of the installation untick the visual studio integration installation if ticked.

Then create a batch file with the following contents:

"C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon" rescan
PAUSE

This will need to be ran as administrator.

Double Click solution:

Move the batch file to another location on the computer. Right click the batch file and select "Send To" -> "Desktop (Create Shortcut)".

Go to the desktop and right click on the shortcut and select "Properties", on the "Shortcut" Tab click "Advanced..." and tick "Run as administrator".

This will still cause the screen to dim with a notification but when you click yes it should work.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like