Copy of the post from stackoverflow.com
Q: Device misdetected as serial mouse.
I’m working on a device which communicates with a PC through a (virtual) serial port. The problem is that the data we are sending occasionally gets incorrectly identified by Windows as a bus mouse, after which the “Microsoft Serial Ballpoint” driver is loaded and the mouse pointer starts jumping around on the screen and randomly clicking on things.
A bit of Googling reveals that is an old and well-known problem with serial devices where the usual work-around is a bit of registry hacking to disable the offending driver. That it is a lot to demand from our users however and I’d rather not have our application messing around with the user’s registry. Especially not when the fix is dependent on the Windows version and the user may well be using a bus mouse.
Instead I’d like to avoid the problem by changing our protocol to not send any data which may get us misidentified as a mouse. The only problem is that I’m not quite certain what patterns to avoid. Apparently Microsoft’s Mouse protocol consists of packets of four bytes where the MSB of the first is set and that of the last three is clear.
Would sending only 7-bit ASCII suffice? Are there any other devices I need to worry about being detected as?
I just encountered this problem myself on
Windows 7 Professional x64, and a solution that worked for me was to go into the registry and edit the following value:
4, which is
Disabled and it will stop this problem occurring.
A reg edit command would be as follows:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\sermouse" /V Start /T REG_DWORD /F /D 4
You then need to restart the computer, which should now start correctly and not attempt to discover a serial mouse.
There is a simple program to solve this problem.
http://www.stentec.com/anonftp/pub/wingps/pnpblockersetup.exe ( freeware)
Download, install, run and select available comport(s), restart and finished.
So simple and great easy tool to solve this very old Windows problem, a must have for everybody using GPS or other NMEA sources, to start-up Windows without disconnecting NMEA data source at start up to avoid a jumping mouse.