libusb driver installation with NSIS on Windows 8

477 Views Asked by At

I have a problem by installing the libusb driver on Windows 8. I generated a .inf file, which includes the device information like vid, pid, name,.... In my installer (currently generated with NSIS) I call the rundll32.exe:

ExecWait 'rundll32.exe "$INSTDIR\sys\amd64\libusb0.dll",usb_install_driver_np_rundll $INSTDIR\sys\libusbHE.inf' $0

So this part don't work with Windows 8 because I don’t have a signed .cat file. Now I used the libwdi to generate a new .inf file and the self-certificated .cat file.
I called the the libwdi (like wdi-simple) from my NSIS script. The installation works for Windows 7 and 8, but the Problem is that: when a user calls the installer again, it install the driver again (shown with pnputil.exe –e)

How can I check in NSIS, if the driver already installed or not? Or how can I uninstall all previous installed driver (from my device) automatically in the NSIS script. (Not manually like pnputil.exe –f –d <...inf>)

0

There are 0 best solutions below