Sometimes you need to remove device driver manual, because Device Manager in Windows does not want to remove anything and gives you “Error 31”.
If this is your case, this is the guide for you. I’ve spent a sleepless night trying to figure out how to fix this problem..
In my case that was Network Adapter Drivers that did not want to work. Wireless adapter did have a yellow triangle and in properties it showed Error 31. All the attempts to remove the device or driver did not work – the device just appeared again. So I had to manually remove the drivers.

Run device manager find your driver file and *.inf file are used by this device.

For driver files you have to read providers. If provider is Microsoft you can’t touch driver and
driver service – you can only remove non-system drivers

Remove registry folder:

Next remove driver files (*.dll,*.sys) ,*.inf file relate to your device you can find in


Don’t forget to do full backup of registry and not completely delete driver files, but misplace them: put in C:\tmp

Information taken from this discussion: