Creating a Usb Install Package

LibUsbDotNet

LibUsbDotNet 2.2.8 Creating a Usb Install Package
LibUsbDotNet on SourceForge

InfWizard creates usb setup packages using InfWizard driver resource packages.

Building a Generic Setup Package with InfWizard
  1. Plug in the usb device. If Windows displays the Found New Hardware Wizard, close it now.

    Launch the InfWizard and click Next.

    InfWizard Welcome page.
    Welcome
  2. If InfWizard does not find any driver resource packages, the download driver resource page is shown.

    Click the Download driver resources from the internet radio button. This gets the list of driver resource packages available for download. By default, all packages are selected for download.

    Click the Download button and wait for the package downloads to complete.

    Prepare to download driver resource package(s).
    Driver Resource Downloader
    Select driver resource packages to download.
    Download Driver Resource List
    Driver resource download complete.
    Download Driver Resources
  3. Select a usb device to generate an installation package for. By default, InfWizard will display only devices that are currently connected to the pc (Connected) and do not already have drivers installed. (Driverless)

    Click Next.

    Select a device.
    Device Selection
  4. Select the driver resource package that will be used to generate this setup package.

    Select a Save Directory where the setup package will be written. If the Create Driver Directory property is true, the setup package is written to a sub-directory of the Save Directory named to the Base Filename IE: SaveDirectory\BaseFilename

    Optionally, fine-tune the device description, manufacturer, and any other of the properties in the grid.

    Before clicking next, the profile can be saved and loaded at later time for further modification.

    Click Next and the setup package will be generated and written to the Save Directory.

    Configure the device.
    Device Configuration
    Setup package generation finished.
    Package Generation
  5. At this point the setup package should have been generated and residing in the Save Directory.

    If desired, this package can be installed by clicking the Install Now button.

    Setup package installed successfully.
    Driver Installer

Example
CopySetup Inf
[Version]
Signature = "$Windows NT$"
Class = WinUsbDevices
ClassGuid={A219BCD5-74D8-4d79-A91F-01F749642227}
Provider = %ProviderName%
CatalogFile=Benchmark_Device.cat
DriverVer = 04/14/2010, 1.0.0.0

; ========== Manufacturer/Models sections ===========
; .ntx86, .ntia64, and .ntamd64

[Manufacturer]
%ProviderName% = Benchmark_Device,ntx86,ntamd64,ntia64

[Benchmark_Device.ntx86]
%USB\Benchmark_Device.DeviceDesc% =Benchmark_Device_Install, USB\VID_04D8&PID_0053

[Benchmark_Device.ntamd64]
%USB\Benchmark_Device.DeviceDesc% =Benchmark_Device_Install, USB\VID_04D8&PID_0053

[Benchmark_Device.ntia64]
%USB\Benchmark_Device.DeviceDesc% =Benchmark_Device_Install, USB\VID_04D8&PID_0053

; =================== Installation ===================

;=========================================================================================
;ClassInstall32 and ClassInstall_AddReg sections used to make new device manager category.
;=========================================================================================
[ClassInstall32]
AddReg=ClassInstall_AddReg

[ClassInstall_AddReg]
HKR,,,,%DEVICEMANAGERCATEGORY%
HKR,,Icon,,"-20"

[Benchmark_Device_Install]
Include=winusb.inf
Needs=WINUSB.NT

[Benchmark_Device_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName     = %WinUSB_SvcDesc%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\WinUSB.sys

[Benchmark_Device_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install

[WinUSB_Install]
KmdfLibraryVersion=1.9

[Benchmark_Device_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{591a9b4c-cc1c-40ed-a9c2-bbd698899f3b}"

[Benchmark_Device_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

; ================= Source Media Section =====================
[SourceDisksNames]
1 = %DISK_NAME%,,,\x86
2 = %DISK_NAME%,,,\amd64
3 = %DISK_NAME%,,,\ia64

[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01009.dll=1

[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01009.dll=2

[SourceDisksFiles.ia64]
WinUSBCoInstaller2.dll=3
WdfCoInstaller01009.dll=3

; =================== Strings ===================
[Strings]
ProviderName="Travis Robinson"
USB\Benchmark_Device.DeviceDesc="Benchmark Device"
WinUSB_SvcDesc="Benchmark Device Service 04/14/2010, 1.0.0.0"
DISK_NAME="Benchmark Device Install Disk"
DEVICEMANAGERCATEGORY="WinUsb Devices"