1

My situation: I use a gaming laptop and it is inconvenient for me to play on the keyboard of the laptop itself. So I use a mechanical keyboard and put it over the laptop keyboard, which causes the laptop keys to be pressed randomly. To solve this problem, I am constantly deleting the keyboard driver via Device Manager (i specifically don't disable the automatic loading of the driver after a reboot).

I've only found this removal method on the internet, but I can't find its number.

pnputil.exe –f –d oem<number>.inf

Is it possible to remove the driver in any way via cmd, knowing only (Device HID\VID_048D&PID_C101&COL02\7&3748EDCE&0&0001)? (cmd, because I want to make a script)

2 Answers 2

0

You may use Nirsoft's DevManView:

Enable/disable/uninstall a device from command-line

You can use the following command-line options to enable/disable/uninstall a device from command-line. You can specify the device by its exact name, as appeared in the 'Device Name' column, for example:

DevManView.exe /RunAsAdmin /disable "WD 2500BMV External USB Device"

You can also specify the value displayed in the Device Instance ID column, for example:

DevManView.exe /RunAsAdmin /enable "USBSTOR\Disk&Ven_WD&Prod_2500BMV_External&Rev_1.05\584953930578345789&0"

You may also use this utility to uninstall a device by using the sub-command /uninstall <Device Name> in order to uninstall the specified device.

You may create .bat files with the commands to disable and enable this one keyboard. If you store these two files on the desktop, you can also assign them keyboard shortcuts for ease of use. You will need to allow execution as Administrator.

You may find the keyboard's exact name in the Device Manager.

6
  • I've tried it, the problem with this script is that it disables the external USB keyboard too
    – reiwoo
    Commented Mar 8 at 17:16
  • The AutoHotKey script approach doesn't work, so I rewrote my answer.
    – harrymc
    Commented Mar 9 at 10:26
  • I used the command, but nothing happens. The loading cursor appears but there is no effect.
    – reiwoo
    Commented Mar 9 at 12:24
  • Use the DevManView list option to be sure of the name of the device.
    – harrymc
    Commented Mar 9 at 14:56
  • It only works after restarting the laptop
    – reiwoo
    Commented Mar 10 at 8:24
0
  1. To the driver being reinstalled immediately,

    • Press Windows, type cmd, press CtrlShift and allow CMD prompt to run as Administrator.
    • Enter sc config i8042prt start= disabled and press Enter.
    • Uninstall the keyboard driver using Device Manager as you have done before.
    • Perform a complete reboot.
    • To re-enable the service, use sc config i8042prt start= auto.
  2. Personally, I'd prefer using hardware hacks, such as

    • Put a few stick-on felt or rubber feet, such as used as floor or furniture protectors, around the edges of the laptop keyboard (if you do not close the lid) or on the bottom of the external keyboard, so that it does not press on the keys. That also helps avoid physical damage to the internal keyboard.
    • Open the case and unplug the internal keyboard.
    • Put a small switch in series with the internal keyboard power connection.
3
  • The problem with this method is that it disables all keyboards, not just the built-in one. And it only works after a reboot, which is a minus.
    – reiwoo
    Commented Mar 9 at 12:27
  • Umm... unplugging a keyboard does not prevent use of USB keyboards, nor does adding felt spacers. Commented Mar 10 at 0:14
  • I don't want to completely remove the built-in keyboard because I use it at times.
    – reiwoo
    Commented Mar 10 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .