-
Notifications
You must be signed in to change notification settings - Fork 1
Driver testing
- Install Visual Studio.
- Install Windows Driver Kit (WDK).
- Built the driver, so that you already have
MouseMirror.sys
/MouseMirror.inf
andTailLight.sys
/TailLight.inf
available.
Drivers should be tested on a separate computer, since malfunctioning drivers might crash the system. Driver debugging furthermore require running the debugger on a separate computer, since breaking execution will freeze the tested computer.
The TailLight
driver will install itself on the top of the existing "HID-compliant vendor-defined device" driver for HID\VID_045E&PID_082A&MI_01&Col05
:
Microsoft driver selection documentation.
Steps to enable driver loading:
- Disable Secure Boot in UEFI/BIOS.
- Enable test-signed drivers:
bcdedit /set testsigning on
- Enable kernel debugging:
bcdedit /debug on
- Either: Configuration of KDNET network kernel debugging with a network cable if you have a supported NIC.
- Or: Configuration of kernel-mode debugging over a USB 3.0 cable with a USB 3 A/A crossover cable:
bcdedit /dbgsettings usb targetname:KernelUSBConn
- From the host computer, connect with the WinDbg over USB to the
KernelUSBConn
target.
- Restart the target computer.
- Reconnect to the target computer using WinDbg.
- Break execution and send the following command to enable display of debug messages:
kd>
ed nt!Kd_DEFAULT_Mask 0xff
Driver verifier is an in-built Widows feature that monitors kernel-mode drivers to detect illegal function calls or actions that might corrupt the system. It can be enabled with the following commands:
- Run
verifier.exe
from an admin command-prompt. - Select "Create standard settings".
- Select "Select driver names from a list".
- Select
MouseMirror.sys
and/ortaillight.sys
and click "Finish". - Reboot to make the changes take effect.
- Run
INSTALL.bat
from an admin command-prompt. Click on "Install this driver software anyway" when being warned about the publisher:
- It's also possible to install the driver manually from "Device Manager" by navigating to the "HID-compliant vendor-defined device" with
HID\VID_045E&PID_082A&MI_01&Col05
hardware ID. Right-click on the relevant device, and select "Update driver". Click on "Browse my computer for drivers". Click on "Let me pick from a list...". Click on "Have Disk..." and select TailLight.inf in the file system.
- Run
UNINSTALL.bat
from an admin command-prompt. - It's also possible to uninstall the driver manually from "Device Manager".
Example output when running the WMI test script:
>powershell -file IntelliMouse.ps1
IntelliMouse device:
InstanceName: HID\VID_045E&PID_082A&MI_01&Col05\7&181f730b&0&0004_0
Active: True
Color: 0
Changing color to ff0000
Storing changes...
From the Microsoft Mouse & Keyboard Center, try to change the tail-light to white
:
Observe that the tail-light instead becomes red
and the following error is added to the Windows Event "System" log: