16 August 2018

Windows 7 - Renaming Device-names in Device Manager.

This post is mainly for my own future benefit, as I'm bound to forget the following procedure before long.  Hopefully though, someone else may stumble across this in the fullness of time and find it useful.

Needless to say, I've come across this issue before.  Admittedly, the problem is psychological in nature, as it really doesn't effect Window's operation, but I find it really frustrating when playing with Window device-drivers.

Insert a piece of hardware on your pc, install its driver and hopefully everything works.  Remove said-hardware, reboot pc, and Windows detects this and acts accordingly.  The problem arises when the same hardware is then reinserted.  Windows again detects it, but doesn't start with a 'clean-slate', instead, using the same device-name, appends a "#2" to it.  Do it again, and this number increases (#3 etc.), and continues upward with every removal/reinsertion - still just one device listing, with the same name, but an ever-increasing tail-end.  Given the number of problems I have had with Window's drivers, I find this maddening!!!

The problem isn't helped by the number of 'solutions' out there either - dozens & dozens of them, though admittedly, some address simpler renaming issues, whereas (many) others are just well-meaning individuals that haven't read/understood the problem and are providing even simpler, though useless, answers.  This problem has no simple fix, though there is more than one solution out there.  The first one I came across (years ago!) involved using Regedit - tedious, but it did work.  The latest & greatest fix, just googled, is much easier and takes a fraction of the time.  But enough of the preamble.

The first step is to create a system-variable - 'devmgr_show_nonpresent_devices'.  Working from the Start menu, left-click 'Computer'->'Properties', click 'Advanced System settings', then select the 'Advanced' tab on the pop-up window.  Now click 'Environment variables', then 'Add', and name the new variable 'devmgr_show_nonpresent_devices' as mentioned.  Give it a value of 1.

Now all there's left to do is (important) log out/back-in, and open Device Manager.  Go to the 'View' menu option and select 'Show hidden items'.  Of the Device causing offense, all items-names are now shown, including the all-important 'base-item' name.  Just delete ALL of these names, scan for hardware changes, and Voila!  Windows will reinstall the device's driver, using just the 'base-name' with no appended #x number.