I am using a Teensy 3.5 that I am programming as a joystick. It works great until I use a different Teensy based joystick on the same computer. Windows will not recognize it properly. This is a know issue and there is a fix. It is explained here:
https://forum.pjrc.com/threads/23566-Teensyduino-USB-Joystick-no-data-driver-problem-workaround
In short, I need to search the whole registry and delete all keys containing "VID_16c0". After this is done, the new joystick based Teensy will work no problem.
Its a bit cumbersome so I would like to be able to write a small executable that will do this for me.
I am using Delphi XE2.
I already know how to delete a the key if I know the full path: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Registry_TRegistry_DeleteKey.html
But I can't find a method that allows me to search the registry for a key containing "VID_16c0" in its name.
Examples of key names:
VID_16C0&PID_0488
##?#HID#VID_16C0&PID_0482&MI_01&Col01#7&30828b33&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}
##?#USB#VID_16C0&PID_0478#00084F1E#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Any pointers would be greatly appreciated.
Many thanks, E.