Your real problem is that you don't know beforehand which driver your device will be using. If you're doing the driver install as part of an installer (e.g. using wdi-simple.exe) or instructing your users to use zadig.exe then you should already know which driver has been installed. I would say it's highly unusual to not know the driver for a device you control, which is one of the reasons why everyone has rejected the registry idea.

And since you'll know which driver has been installed, you'll know which backend to use.

You can include a libusb dll with your program and add its directory to the front of the PATH, like so:

os.environ['PATH'] = get_main_dir() + ';' + os.environ['PATH']

Which will guarantee that you're using the DLL you think you are.

P.S. all these can be put together nicely with cx_freeze and inno setup to create a "real program" for your users.

Best Regards,
Jeff

On 8/20/2016 5:19 AM, Hermann Hamann wrote:
Hi
>  ..and debug the real problem
What is my real problem?
H.H.


------------------------------------------------------------------------------


_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

------------------------------------------------------------------------------
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to