Hi experts,
the installation of my Windows Forms application wreaks havoc on the USB subsystem. Any USB device plugged in the machine won't function unless it has already been plugged into that very USB port at a time before my software was installed.
Has anyone had such behaviour before? And maybe even a solution how to not disturb other vendors' devices?
More detailed description
The application's purpose is to communicate with a device my company sells. Communication is done via a dedicated USB IC from
http://www.ftdichip.com/[
^]. For the application to be sure to communicate to one of our devices instead of anything that also uses those chips, we have been assigned a separate PID. An adapted ftdibus.inf file reflects this change.
The USB driver files are held in a subdirectory of the installation path (which the user can choose). To make Windows aware of these files, my installer alters the registry key
HKLM\Software\Microsoft\Windows\CurrentVersion\DevicePath
. The correct USB driver files path is appended to that key's value. This leaves anything that may have been there untouched. Uninstallation removerts our changes. Since our devices are detected by my application, this seems to work as expected (without the registry change, it does not).
The driver loses its certification due to the changed .inf file. Lack of certification means not to be able to silently install the driver. To save the user a lot of annoying message box clicking, the driver shall not be re-installed every time another one of our devices is plugged in. So there's also a registry entry at
HKLM\SYSTEM\CurrentControlSet\Control\UsbFlags\IgnoreHWSerNum1234CDEF
Other than that, I didn't code any registry changes.
Effects
USB devices that are already known to the PC in question, and are connected to a USB port that they have already been connected to, keep working.
Plugging a known device into a USB port it has not earlier been connected to result in an "Unknown Device" in Device Manager and the device not working.
Connecting a totally new device to the PC causes its driver to be installed (at least a pop-up from the taskbar tells so) and also shows an "Unknown Device" in Device Manager.
Un-installing the software doesn't restore normal USB behaviour.
All devices that I witnessed refusing to work could be activated by explicitly installing their drivers from within Device Manager.
The problem was observed on Windows XP Prof and Windows 7 64 Prof.
[Edit]
I got two regedit.exe exports from before and after the software installation. The already mentioned DevicePath registry key baffles me:
before:
"DevicePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
00,74,00,25,00,5c,00,69,00,6e,00,66,00,00,00
after:
"DevicePath"="%SystemRoot%\\inf;C:\\Program Files (x86)\\Corporation\\Application Name\\include\\USBDriver"
Using regedit.exe with the nice tree view and edit fields I've never seen this format. Just now in WinMerge.
[/Edit]