Giter VIP home page Giter VIP logo

install-inf's Introduction

install-inf

Abstract

install-inf.pl is a simple Perl script which can be used as a lighweight replacement for Zadig.

Motivation

If you ever tried to replace a standard Windows driver for some USB device with a libusb-compatible one (such as the stock winusb.sys driver) then you know that it's not as simple as it sounds in the official Microsoft WinUSB guide.

Going through the Device Manager and navigating to the .inf-containing folder usually ends up with messages like "The best driver for your device is already installed" or "The folder you specified doesn't contain a compatible software driver for your device".

The trick is to force-update the driver. This can be achieved by calling UpdateDriverForPlugAndPlayDevices SetupAPI function while passing it the hardware ID of a device and the path to a particular .inf file.

Usage

  1. Prepare the proper .inf file as described in the official Microsoft WinUSB guide.
  2. [OPTIONAL] Create a .cat file using inf2cat and sign it with signtool
  3. Make sure Perl is accessiblve via PATH environment variable. Note that you need 64-bit Perl on 64-bit Windows.
  4. From an elevated command prompt run:

    perl install-inf.pl <path-to-inf>
  5. Unless you have created a properly signed .cat file, you will see a "Windows Security" warning stating that "Windows can't verify the publisher of this driver software". When you do, fearlessly hit "Install this driver software anyway".
  6. Go to the Device Manager and make sure your device has moved from its original group into "Universal Serial Bus devices" and its name is now the same as in the .inf file.
  7. Congratulations! Now you can work with your device via libusb API.

install-inf's People

Contributors

vovkos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dresseguier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.