Discussion:
[Libusb-devel] windows_backend: install .inf file with NSIS/other installer
Satz Klauer
2011-11-27 16:01:42 UTC
Permalink
Hi,

I plan to create a (NSIS) installer script to let the .inf file of my
libusb1-based device be installed automatically so that the user does
not have to tell Windows where to look for the .inf file.

I found an old mailing list thread that pointed to this example:
http://libusb-win32.svn.sourceforge.net/viewvc/libusb-win32/trunk/libusb/examples/driver_installer_template.iss?revision=395&view=markup

There a function usb_install_driver_np_rundll out of libusb0 is called
to install the .inf file. Unfortunately this function does not exist
for libusb1.

So what to do? How else can I install an .inf file?

Elmi

PS: there is a description for NSIS that recommends to use pnputil for
Win Vista/7 but that does not work, pnputil always fails with an
"access denied" error although I have all required privileges...
Pete Batard
2011-11-28 00:26:38 UTC
Permalink
Post by Satz Klauer
I plan to create a (NSIS) installer script to let the .inf file of my
libusb1-based device be installed automatically so that the user does
not have to tell Windows where to look for the .inf file.
(...)
So what to do? How else can I install an .inf file?
Have you looked into using libwdi [1]?

It was created to solve exactly the problem of installing driver files
for libusb-1.0 applications (or libusb-win32 or libusbK ones).

While the most common usage of libwdi is the generation and signing of a
generic driver package on the fly, for seamless installation, it does
also allow the embedding of your own custom inf and driver files if needed.
Oh, and it also provides an example of an NSIS script for libusb driver
installation [2] or [3]...

Now, in case you did look at libwdi (or decide not to use it after
looking at it), I'd appreciate if you provide some feedback on why you
don't think it may be suitable for your task, as it was very much
designed to solve all of the issues surrounding the libusb-1.0 driver
installation on Windows, and improvement suggestions are most welcome.

Regards,

/Pete

[1] http://libwdi.sf.net
[2]
http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Signed_driver_walkthrough#Nullsoft_Scriptable_Install_System_Script
[3]
http://libwdi.git.sourceforge.net/git/gitweb.cgi?p=libwdi/libwdi;a=blob;f=examples/wdi-simple.nsi
Satz Klauer
2011-11-28 06:39:22 UTC
Permalink
Post by Pete Batard
Post by Satz Klauer
I plan to create a (NSIS) installer script to let the .inf file of my
libusb1-based device be installed automatically so that the user does
not have to tell Windows where to look for the .inf file.
(...)
So what to do? How else can I install an .inf file?
Have you looked into using libwdi [1]?
Not until now...looks good, I'll check that - thanks!

Elmi

Loading...