3

I'm working with a GPS sports logger for which Windows 10 default installs the usbser.sys driver. This standard driver does not support the WebUSB API. For that reason, on my local Windows 10 machine, I successfully use Zadig (v2.4) to install the libusbK driver.

Because I've open sourced the WebUsb-mtk code specific to this GPS sports logger (and other loggers with the MTK 3329 GPS module), I'd like to also distribute this signed driver to other Windows 10 users of similar hardware.

What are the steps to generate an installation package that correctly disables (?) the existing driver and installs the libusbK driver for my hardware? (LibUSBK is already signed, so I think the signature is not relevant.)


p.s. With Mac OS X, WebUSB for this hardware works out of the box.

1 Answer 1

3
+100

According to libusbK - Creating Client Installers With InfWizard, the installer does basically all its operations by using the Driver Package Installer (DPInst), which is a standard feature in Windows.

According to Using DPInst to Uninstall Driver Packages, the syntax to uninstall a driver is:

DPInst.exe /u path-to-inf-file

The driver for usbser.sys I found in the folder C:\Windows\WinSxS\amd64_dual_usbser.inf_31bf3856ad364e35_10.0.17134.1_none_8281fb62ec80df7e, so uninstalling it could be by using a command such as:

DPInst.exe /u C:\Windows\WinSxS\amd64_dual_usbser.inf_31bf3856ad364e35_10.0.17134.1_none_8281fb62ec80df7e

It would of course be better if your installer could verify first that this file exists, and if not then search for it.

The next step would be to install libusbK using the command:

DPInst.exe libusbK.inf

Since you have installed libusbK, you should have the .sys and the .inf files that belong to it. You need to have them both in one folder, then invoke DPInst on the .inf file.

(As I don't have these files, this answer is mostly theory.)

11
  • thanks! so the installer is actually just a dos script? Can I uninstall usbser.sys for just this device, and not for potentially all devices?
    – philshem
    Commented Nov 15, 2018 at 15:18
  • It was probably done in the installer via a program, rather than a script, but might be possible from a script. From usbser.inf I gather that this is a generic driver that is associated with USB devices in general and doesn't specify device-ids. I don't have the files for libusbK so can't examine them.
    – harrymc
    Commented Nov 15, 2018 at 15:31
  • I read a bit more. It seems one way is to use Visual Studio to create a driver package docs.microsoft.com/en-us/windows-hardware/drivers/develop/… Also it seems DPInst is now DIFX
    – philshem
    Commented Nov 15, 2018 at 18:21
  • Also it seems that Zadig.exe can create the files necessary to share as a driver install package. I'll keep trying, but many thanks for a push in the right direction.
    – philshem
    Commented Nov 15, 2018 at 18:24
  • DPInst is still there and is used by the libusbK installers, so it still works as well as ever. If made available libusbK.inf/sys I'll compare with usbser.inf.
    – harrymc
    Commented Nov 15, 2018 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .