Creating Default Install Section in Inf File for Driver Installation

0

I have the same question as asked here: Create DefaultInstall section in an inf file

I left a comment asking for an update but that question seems to be long abandoned. My situation is practically identical to the OP's: I am able to install the driver by going through the device manager, clicking "update driver software", "Browse my computer...", "Let me pick from a list...", "Have disk...", and browsing to my inf file. As I'm sure you can tell, however, this is a long, irritating process that I would hate to have customers deal with. Therefore I would like to be able to install the driver through the context menu when right-clicking on the inf file. Unfortunately any documentation I've read on the DefaultInstall section (most of which has been directly from Microsoft) has been very generic and I have no idea how to implement it in my file. My project is a simple CDC device, and I already have my inf file and my cat file.

Has anyone here had direct experience with this who can help me with the process?

I'm not sure if this should be posted here or on Superuser - feel free to migrate if needed.


UPDATE:

I tried modifying the .inf file for Arduino using my own product information. When I right-click the .inf file and select "Install" it pops up with the confirmation dialog asking if I would like to install the software. When I click yes it acts like it installs everything, but my device manager still does not recognize my device. This is still the case even after a reboot. What am I missing here? Below is my .inf file, with some details hidden (this is still an unreleased product):

[Strings]
DriverPackageDisplayName="XXXXX Driver"
ManufacturerName="XXXXX"
ServiceName="XXXXX Driver"
DESCRIPTION="XXXXX"

[DefaultInstall]
CopyINF=myDriver.inf

[Version]
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Signature="$Windows NT$"
Provider=%ManufacturerName%
DriverPackageDisplayName=%DriverPackageDisplayName%
CatalogFile=myDriver.cat
; DriverVer date is MM/DD/YYYY
DriverVer=01/10/2019,1.00

[Manufacturer]
%ManufacturerName%=DeviceList, NTamd64, NTia64

[DestinationDirs]
FakeModemCopyFileSection=12
DefaultDestDir=12

[DeviceList]
%DESCRIPTION0%=DriverInstall, USB\Vid_xxxx&Pid_xxxx

[DeviceList.NTamd64]
%DESCRIPTION0%=DriverInstall, USB\Vid_xxxx&Pid_xxxx

[DeviceList.NTia64]
%DESCRIPTION0%=DriverInstall, USB\Vid_xxxx&Pid_xxxx

[DriverInstall]
include=mdmcpq.inf,usb.inf
CopyFiles = FakeModemCopyFileSection
AddReg=DriverAddReg

[DriverAddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[DriverInstall.Services]
include=mdmcpq.inf
AddService=usbser, 0x00000002, DriverService

[DriverService]
DisplayName=%ServiceName%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys
LoadOrderGroup=Base
installation
driver
inf
asked on Stack Overflow Jan 10, 2019 by DerStrom8 • edited Jan 10, 2019 by DerStrom8

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0