;/*++
;
;Copyright (c) Microsoft Corporation. All rights reserved.
;
;INF Name:
;    genericusbfn.inf
;
;Abstract:
;    INF for installing the generic USB function class driver
;
;--*/

[Version]
Signature   = "$WINDOWS NT$"
Class       = USB
ClassGuid   = {36FC9E60-C465-11CF-8056-444553540000}
Provider    = %MSFT%
PnpLockdown = 1
DriverVer = 05/06/2022,10.0.22621.1

[SourceDisksNames]
3426 = windows cd

[SourceDisksFiles]
genericusbfn.sys = 3426

[DestinationDirs]
genericusbfn.CopyFiles = 13

[Manufacturer]
%genericusbfn.Mfg% = genericusbfn, NTamd64

[genericusbfn.NTamd64]
%genericusbfn.DeviceDesc%=genericusbfn.Install, USBFN\GENERICUSBFN
%genericusbfn.DeviceDesc%=genericusbfn.InstallMTPSecure, USBFN\MTP
%genericusbfn.DeviceDesc%=genericusbfn.InstallSecure, USBFN\IpOverUSB
%genericusbfn.DeviceDesc%=genericusbfn.Install, USBFN\UOSFlashing
%genericusbfn.DeviceDesc%=genericusbfn.Install, USBFN\MainOSFlashing

[genericusbfn.Install.NT]
CopyFiles = genericusbfn.CopyFiles

[genericusbfn.InstallMTPSecure.NT]
CopyFiles = genericusbfn.CopyFiles

[genericusbfn.InstallSecure.NT]
CopyFiles = genericusbfn.CopyFiles

[genericusbfn.InstallMTPSecure.NT.HW]
AddReg=genericusbfn.SecurityAddRegMTP

[genericusbfn.InstallSecure.NT.HW]
AddReg=genericusbfn.SecurityAddReg

[genericusbfn.SecurityAddRegMTP]
HKR,,DeviceCharacteristics,0x10001,0x100 ;FILE_DEVICE_SECURE_OPEN
; Allowing Read-Write access to MTPService by giving access to all interactive users and adding SID for MTPService
HKR,,Security,,"D:P(A;;GRGW;;;IU)(A;;GRGW;;;S-1-5-80-2568746867-1941474774-3272231742-1835551693-3492874898)"

[genericusbfn.SecurityAddReg]
HKR,,DeviceCharacteristics,0x10001,0x100 ;FILE_DEVICE_SECURE_OPEN
; Allowing Read-Write access to IpOverUsbService
HKR,,Security,,"D:P(A;;GRGW;;;S-1-5-80-36820300-1719600136-3265905435-3992692656-1781774056)"

[genericusbfn.CopyFiles]
genericusbfn.sys

[genericusbfn.Install.NT.Services]
AddService = genericusbfn, 2, genericusbfn.AddService

[genericusbfn.InstallMTPSecure.NT.Services]
AddService = genericusbfn, 2, genericusbfn.AddService

[genericusbfn.InstallSecure.NT.Services]
AddService = genericusbfn, 2, genericusbfn.AddService

[genericusbfn.AddService]
DisplayName     = %genericusbfn.ServiceName%
ServiceType     = 1     ; SERVICE_KERNEL_DRIVER
StartType       = 3     ; SERVICE_DEMAND_START
ErrorControl    = 1     ; SERVICE_ERROR_NORMAL
ServiceBinary   = %13%\genericusbfn.sys
LoadOrderGroup  = Base

[Strings]
MSFT = "Microsoft"
genericusbfn.Mfg = "Generic USB Function Class"
genericusbfn.DeviceDesc = "Generic USB Function Class"
genericusbfn.ServiceName = "Generic USB Function Class"
