Skip to content

Instantly share code, notes, and snippets.

@tracernz
Created January 25, 2016 06:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tracernz/26a5c4343cec83462fed to your computer and use it in GitHub Desktop.
Save tracernz/26a5c4343cec83462fed to your computer and use it in GitHub Desktop.
;/*++
;
;Copyright (c) Microsoft Corporation. All rights reserved.
;
;Module Name:
; usbser.inf
;
;Abstract:
; INF file for installing the USB Serial driver
;
;--*/
;*****************************************
; Version section
;*****************************************
[Version]
Signature = "$WINDOWS NT$"
Class = Ports
ClassGUID = {4D36E978-E325-11CE-BFC1-08002BE10318}
Provider = %MSFT%
PnpLockdown = 1
DriverVer=06/21/2006,10.0.10586.0
[DestinationDirs]
DefaultDestDir = 12
UsbSerial_CopyFiles = 12
[SourceDisksNames]
3426 = windows cd
[SourceDisksFiles]
usbser.sys = 3426
[ControlFlags]
ExcludeFromSelect = *
;*****************************************
; Install Section
;*****************************************
[Manufacturer]
%MSFT% = Standard, NTamd64
[Standard.NTamd64]
%UsbSerial.DeviceDesc% = UsbSerial_Install, USB\Class_02&SubClass_02&Prot_01
%UsbSerial.DeviceDesc% = UsbSerial_Install, USB\Class_02&SubClass_02
; USB modem filter driver for use with Include/Needs only
%UsbSerialModem.DeviceDesc% = UsbSerial_ModemFilter_Install
[UsbSerial_Install.NT]
CopyFiles = UsbSerial_CopyFiles
AddReg = UsbSerial_AddReg
AddProperty = UsbSerial_AddProperty
; intentionally blank so that in future if we ever put anything in here
; it will get get picked up via Include/Needs
[UsbSerial_Install.NT.Hw]
[UsbSerial_CopyFiles]
usbser.sys,,,0x100
[UsbSerial_AddReg]
HKR,,PortSubClass,%REG_BINARY%,02
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[UsbSerial_AddProperty]
GenericDriverInstalled,,,,1
;*****************************************
; Service installation section
;*****************************************
[UsbSerial_Install.NT.Services]
AddService = usbser,0x00000002,UsbSerial_Service_Install, UsbSerial_EventLog_Install
[UsbSerial_Service_Install]
DisplayName = %UsbSerial.DriverDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbser.sys
[UsbSerial_EventLog_Install]
AddReg=UsbSerial_EventLog_AddReg
[UsbSerial_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\Drivers\usbser.sys"
HKR,,TypesSupported,0x00010001,7
;***********************************************************
; Modem install section to install usbser as a lower filter
; (Include/Needs from modem INFs)
;***********************************************************
[UsbSerial_ModemFilter_Install]
CopyFiles=UsbSerial_CopyFiles
[UsbSerial_ModemFilter_Install.Hw]
AddReg=UsbSerial_ModemFilter_AddReg
[UsbSerial_ModemFilter_AddReg]
HKR,,LowerFilters,%REG_MULTI_SZ%,"usbser"
[UsbSerial_ModemFilter_Install.Services]
AddService=usbser,,UsbSerial_Service_Install,UsbSerial_EventLog_Install
;*****************************************
; Strings section
;*****************************************
[Strings]
; localizable
MSFT = "Microsoft"
UsbSerial.DeviceDesc = "USB Serial Device"
UsbSerialModem.DeviceDesc = "USB Serial Modem Device"
UsbSerial.DriverDesc = "Microsoft USB Serial Driver"
; non-localizable
REG_BINARY = 0x00000001
REG_MULTI_SZ = 0x00010000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment