How to troubleshoot Object Name not found when installing Mobile Broadband on Windows Server - windows

I'm troubleshooting the Mobile Broadband Adapter on Windows Server by using Microsoft's:
netwmbclass.inf
cxwmbclass.sys
I copied the inf and sys from Windows 10, and then select it as the driver on Windows server, but the following error occurred:
Windows cannot initialize the device driver for this hardware. (Code 37)
Object Name not found.
For testing purpose, I modified the original netwmbclass.inf by keeping just the "AddReg" section:
;-------------------------------------------------------------------------------
; netwmbclass.inf
;
; Copyright (c) Microsoft Corporation. All rights reserved.
[version]
Signature = "$Windows NT$"
Class = Net
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
Provider = %Msft%
DriverVer = 01/29/2021,10.0.19041.789
[SourceDisksNames]
3426=windows cd
[SourceDisksFiles]
cxwmbclass.sys = 3426
[DestinationDirs]
DefaultDestDir=12
[Manufacturer]
%Msft% = Msft,NTamd64
[Msft.NTamd64]
; DisplayName Section DeviceID
; ----------- ------- --------
%wmbclass.DeviceDesc% = wmbclass.ndi, USB\MS_COMP_MBIM
;-------------------------------------------------------------------------------
; Adapter DDInstall and Services section
; for NetAdapter drivers
[wmbclass.ndi]
AddReg = wmbclass.Reg
; For mobile broadband drivers
[wmbclass.Reg]
HKR, Ndi, Service, 0, %ServiceName%
HKR, Ndi\Interfaces, UpperRange, 0, "flpp4, flpp6"
HKR, Ndi\Interfaces, LowerRange, 0, "ppip"
HKR, , AllowDriverToOverrideDeviceName, 0x00010001, 1
;-----------------------------------------------------------------------------
; Non-localizable Strings
;
[Strings]
ServiceName = "cxwmbclass"
;-----------------------------------------------------------------------------
; Localizable Strings
;
Msft = "Microsoft"
wmbclass.DeviceDesc = "Test Driver for Troubleshooting Object Name Not Found"
wmbclass.Service.DispName = "USB Mobile Broadband Adapter Driver"
Disabled = "Disabled"
Enabled = "Enabled"
SelectiveSuspend = "Selective Suspend"
But the error is still the same even with only the "AddReg" section inside the inf.
I want to find out what is the "Object Name not found"?
What object is missing?
Is it related to the object inside the "netwmbclass.inf" or object related to other dll files?
How to find out the real object related to the "Object Name not found"?

Related

Installing Kernel Mode Driver on Windows 7

I have been going through the tutorial at Microsoft.I have compiled the KMDFSmall Kernel device driver on Windows 7 64 bit. I have completed the programming portion of the tutorial, my code compiled successfully and I have the KmdfSmall.inf file, the KmdfSmall.sys file, the KmdfSmall.cer file, the WdfCoinstaller01011.dll file, the kmdfsmall.cat file too.
However, I don't have a test machine to run this on. I just want to install this toy driver into my own machine. I read here how to install it using add hardware wizard. I went through the steps, but I am running into problem right.
So, I click start and type hdwwiz and run the Add Harware Wizard. I do the manual install, choose the INF file where it says Have Disk, the KmdfSmall Device appears, I click next, but I get the following error message.
The following hardware was not installed.
KmdfSmall Device
An error occurred during the installation of the device.
The system cannot find the file specified.
I don't know what file isn't being found?
Here is my INF file:
;
; KmdfSmall.inf
;
[Version]
Signature="$WINDOWS NT$"
Class=Sample ; TODO: edit Class
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid
Provider=%ManufacturerName%
CatalogFile=KmdfSmall.cat
DriverVer=02/22/2014,19.58.50.950
[DestinationDirs]
DefaultDestDir = 12
; ================= Class section =====================
[ClassInstall32]
Addreg=SampleClassReg
[SampleClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-5
[SourceDisksNames]
1 = %DiskName%,,,""
[SourceDisksFiles]
KmdfSmall.sys = 1,,
;*****************************************
; Install Section
;*****************************************
[Manufacturer]
%ManufacturerName%=Standard,NTamd64
[Standard.NTamd64]
%KmdfSmall.DeviceDesc%=KmdfSmall_Device, Root\KmdfSmall ; TODO: edit hw-id
[KmdfSmall_Device.NT]
CopyFiles=Drivers_Dir
[Drivers_Dir]
KmdfSmall.sys
;-------------- Service installation
[KmdfSmall_Device.NT.Services]
AddService = KmdfSmall,%SPSVCINST_ASSOCSERVICE%, KmdfSmall_Service_Inst
; -------------- KmdfSmall driver install sections
[KmdfSmall_Service_Inst]
DisplayName = %KmdfSmall.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\KmdfSmall.sys
LoadOrderGroup = Extended Base
;
;--- KmdfSmall_Device Coinstaller installation ------
;
[DestinationDirs]
KmdfSmall_Device_CoInstaller_CopyFiles = 11
[KmdfSmall_Device.NT.CoInstallers]
AddReg=KmdfSmall_Device_CoInstaller_AddReg
CopyFiles=KmdfSmall_Device_CoInstaller_CopyFiles
[KmdfSmall_Device_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01011.dll,WdfCoInstaller"
[KmdfSmall_Device_CoInstaller_CopyFiles]
WdfCoInstaller01011.dll
[SourceDisksFiles]
WdfCoInstaller01011.dll=1 ; make sure the number matches with SourceDisksNames
[KmdfSmall_Device.NT.Wdf]
KmdfService = KmdfSmall, KmdfSmall_wdfsect
[KmdfSmall_wdfsect]
KmdfLibraryVersion = 1.11
[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="" ; TODO: add ManufacturerName
ClassName="Samples" ; TODO: edit ClassName
DiskName = "KmdfSmall Installation Disk"
KmdfSmall.DeviceDesc = "KmdfSmall Device"
KmdfSmall.SVCDESC = "KmdfSmall Service"

Installing file system minifilter from INF launched from debug

I am working on my first file system mini-filter. I am using the SwapBuffers sample project in the WDK. I have successfully compiled and deployed this project to a VM from a physical laptop. But the installation from the INF file is failing. I looked in the log file in C:\DriverTest\Logs on the target machine and found these lines in the log file.
UserText="WDTF_TARGETS: Query("HardwareIDs='WDTF\NOEXIST'")"
UserText="WDTF_DRIVER_SETUP_SYSTEM: CreateRootEnumeratedDevicesFromPackage()"
UserText="WDTF_DRIVER_SETUP_SYSTEM:
UserText="WDTF_TEST: System has no device the driver package can be installed onto."
Here is the INF file. It is unmodified from the original sample.
;;; SwapBuffers
;;; Copyright (c) 2001, Microsoft Corporation
[Version]
signature = "$Windows NT$"
Class = "Encryption" ;This is determined by the work this filter driver does
ClassGuid = {a0a701c0-a511-42ff-aa6c-06dc0395576f} ;This value is determined by the Class
Provider = %Msft%
DriverVer = 06/16/2007,1.0.0.3
CatalogFile = swapbuffers.cat
[DestinationDirs]
DefaultDestDir = 12
MiniFilter.DriverFiles = 12 ;%windir%\system32\drivers
;; Default install sections
[DefaultInstall]
OptionDesc = %ServiceDescription%
CopyFiles = MiniFilter.DriverFiles
[DefaultInstall.Services]
AddService = %ServiceName%,,MiniFilter.Service
;; Default uninstall sections
[DefaultUninstall]
DelFiles = MiniFilter.DriverFiles
[DefaultUninstall.Services]
DelService = SwapBuffers,0x200 ;Ensure service is stopped before deleting
; Services Section
[MiniFilter.Service]
DisplayName = %ServiceName%
Description = %ServiceDescription%
ServiceBinary = %12%\%DriverName%.sys ;%windir%\system32\drivers\
Dependencies = "FltMgr"
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
;StartType = 0 ;SERVICE_BOOT_START
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = "FSFilter Encryption"
AddReg = MiniFilter.AddRegistry
; Registry Modifications
[MiniFilter.AddRegistry]
HKR,,"SupportedFeatures",0x00010001,0x3
HKR,"Instances","DefaultInstance",0x00000000,%Instance1.Name%
HKR,"Instances\"%Instance1.Name%,"Altitude",0x00000000,%Instance1.Altitude%
HKR,"Instances\"%Instance1.Name%,"Flags",0x00010001,%Instance1.Flags%
; Copy Files
[MiniFilter.DriverFiles]
%DriverName%.sys
[SourceDisksFiles]
swapbuffers.sys = 1,,
[SourceDisksNames]
1 = %DiskId1%,,,
;; String Section
[Strings]
Msft = "Microsoft Corporation"
ServiceDescription = "Swap Buffers Sample Mini-Filter Driver"
ServiceName = "SwapBuffers"
DriverName = "SwapBuffers"
DiskId1 = "SwapBuffers Device Installation Disk"
;Instances specific information.
Instance1.Name = "SwapBuffers Instance"
Instance1.Altitude = "141000"
Instance1.Flags = 0x0 ; allow automatic attachments
The VMware session has a single hard drive that shows up as a SCSI drive looking at DEVCON.
Can anyone tell me what I'm missing here?
If your driver is not for a piece of hardware, go to
select the "driver package"
open "configuration"
go to "driver install" -> "deployment"
select "Do Not Install"
If needed use a custom command e.g. to run "svcctrl.exe" with the desired parameters.
inf install can fail on these common cases:
The driver is not signed.
The driver is a debug driver signed with the test certificate but the certificate wasn't installed on the target machine. The test certificate generated under your output dir (cer file). Copy it to the target machine and double click it.
The target machine needs to have test signing enabled:
Open admin console
bcdedit -set TESTSIGNING ON
reboot
I find it easier to install from a batch file (don't omit the "./"):
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 ./MY_DRIVER_NAME.inf

Error in installing windows printer driver

I am trying to install a windows printer driver(OEMUNI) provided as a sample in WDK(Windows Driver Kit). But I keep getting following error from add printer wizard: "Printer driver was not installed. Operation could not be completed (error 0x00000002)". I have tried running the add printer wizard with admin privileges but I still get the same problem.
I am using windows 7, 64-bit version. Can somebody help me here ? Also, what would the error code:0x00000002 signify ?
Following is my INF file:-
; OEMDLL.INF
;
; INF file for OEM DLL Customization samples
;
; Copyright 1999-2003 Microsoft Corporation
[Version]
Signature="$Windows NT$"
Provider=%MS%
LayoutFile=ntprint.inf
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer
DriverVer=6/07/2001,1.0.0.1
;
; Manufacturer section.
;
; This section lists all of the manufacturers
; that we will display in the Dialog box
;
[Manufacturer]
"Microsoft"=Microsoft, NTamd64, NTia64
;
; Model sections.
;
; Each section here corresponds with an entry listed in the
; [Manufacturer] section, above. The models will be displayed in the order
; that they appear in the INF file.
;
[Microsoft]
"PostScript WaterMark Sample" = INSTALL_WATERMARK.PS
"Unidrv WaterMark Sample" = INSTALL_WATERMARK.UNI
"OEM PostScript Customization Sample" = INSTALL_OEMPS
"OEM Unidrv Customization Sample" = INSTALL_OEMUNI
"OEM UI Customization Sample (PS)" = INSTALL_OEMUI.PS
"OEM UI Customization Sample (Unidrv)" = INSTALL_OEMUI.UNI
[Microsoft.NTamd64]
"PostScript WaterMark Sample" = INSTALL_WATERMARK.PS
"Unidrv WaterMark Sample" = INSTALL_WATERMARK.UNI
"OEM PostScript Customization Sample" = INSTALL_OEMPS
"OEM Unidrv Customization Sample" = INSTALL_OEMUNI
"OEM UI Customization Sample (PS)" = INSTALL_OEMUI.PS
"OEM UI Customization Sample (Unidrv)" = INSTALL_OEMUI.UNI
[Microsoft.NTia64]
"PostScript WaterMark Sample" = INSTALL_WATERMARK.PS
"Unidrv WaterMark Sample" = INSTALL_WATERMARK.UNI
"OEM PostScript Customization Sample" = INSTALL_OEMPS
"OEM Unidrv Customization Sample" = INSTALL_OEMUNI
"OEM UI Customization Sample (PS)" = INSTALL_OEMUI.PS
"OEM UI Customization Sample (Unidrv)" = INSTALL_OEMUI.UNI
;
; Installer Sections
;
; These sections control file installation, and reference all files that
; need to be copied. The section name will be assumed to be the driver
; file, unless there is an explicit DriverFile section listed.
;
[INSTALL_WATERMARK.PS]
CopyFiles=#OEM.PPD
CopyFiles=#WMARKPS.INI
CopyFiles=WMARKPS
DataFile=OEM.PPD
DataSection=PSCRIPT_DATA
Include=NTPRINT.INF
Needs=PSCRIPT.OEM,PSCRIPT_DATA
[INSTALL_WATERMARK.UNI]
CopyFiles=#OEM.GPD
CopyFiles=#WMARKUNI.INI
CopyFiles=WMARKUNI
DataFile=OEM.GPD
DataSection=UNIDRV_DATA
Include=NTPRINT.INF
Needs=UNIDRV.OEM,TTFSUB.OEM,UNIDRV_DATA
[INSTALL_OEMPS]
CopyFiles=#OEM.PPD
CopyFiles=#OEMPS.INI
CopyFiles=OEMPS
DataFile=OEM.PPD
DataSection=PSCRIPT_DATA
Include=NTPRINT.INF
Needs=PSCRIPT.OEM,PSCRIPT_DATA
[INSTALL_OEMUNI]
CopyFiles=#OEM.GPD
CopyFiles=#OEMUNI.INI
CopyFiles=OEMUNI
DataFile=OEM.GPD
DataSection=UNIDRV_DATA
Include=NTPRINT.INF
Needs=UNIDRV.OEM,TTFSUB.OEM,UNIDRV_DATA
[INSTALL_OEMUI.PS]
CopyFiles=#OEM.PPD
CopyFiles=#OEMUI.INI
CopyFiles=OEMUI
DataFile=OEM.PPD
DataSection=PSCRIPT_DATA
Include=NTPRINT.INF
Needs=PSCRIPT.OEM,PSCRIPT_DATA
[INSTALL_OEMUI.UNI]
CopyFiles=#OEM.GPD
CopyFiles=#OEMUI.INI
CopyFiles=OEMUI
DataFile=OEM.GPD
DataSection=UNIDRV_DATA
Include=NTPRINT.INF
Needs=UNIDRV.OEM,TTFSUB.OEM,UNIDRV_DATA
; Copy Sections
;
; Lists of files that are actually copied. These sections are referenced
; from the installer sections, above. Only create a section if it contains
; two or more files (if we only copy a single file, identify it in the
; installer section, using the #filename notation) or if it's a color
; profile (since the DestinationDirs can only handle sections, and not
; individual files).
;
[WMARKPS]
WMARKPS.DLL
WMARKUI.DLL
[WMARKUNI]
WMARKUNI.DLL
WMARKUNIUI.DLL
[OEMPS]
OEMPS.DLL
[OEMUI]
OEMUI.DLL
[OEMUNI]
OEMUNI.DLL
;
; Data Sections
;
; These sections contain data that is shared between devices.
;
;
; Location of source files not in Layout.inf.
;
[SourceDisksNames]
100 = %OEMSample%
[SourceDisksFiles.x86]
oemps.dll = 100,OEMPS\x86
oemui.dll = 100,OEMUI\x86
oemuni.dll = 100,OEMUNI\x86
wmarkps.dll = 100,WaterMark\x86
wmarkuni.dll = 100,WaterMarkUni\x86
wmarkuniui.dll = 100,WaterMarkUni\x86
wmarkui.dll = 100,WaterMark\x86
[SourceDisksFiles.amd64]
oemps.dll = 100,OEMPS\amd64
oemui.dll = 100,OEMUI\amd64
oemuni.dll = 100,OEMUNI\amd64
wmarkps.dll = 100,WaterMark\amd64
wmarkuni.dll = 100,WaterMarkUni\amd64
wmarkuniui.dll = 100,WaterMarkUni\amd64
wmarkui.dll = 100,WaterMark\amd64
[SourceDisksFiles.ia64]
oemps.dll = 100,OEMPS\ia64
oemui.dll = 100,OEMUI\ia64
oemuni.dll = 100,OEMUNI\ia64
wmarkps.dll = 100,WaterMark\ia64
wmarkuni.dll = 100,WaterMarkUni\ia64
wmarkuniui.dll = 100,WaterMarkUni\ia64
wmarkui.dll = 100,WaterMark\ia64
[SourceDisksFiles]
OEM.PPD = 100
OEM.GPD = 100
WMARKPS.INI = 100
WMARKUNI.INI = 100
OEMPS.INI = 100
OEMUNI.INI = 100
OEMUI.INI = 100
;
; Call SetupSetDirectoryId with 66000 to set the target directory at runtime
; (depending on which environment drivers are getting installed)
;
[DestinationDirs]
DefaultDestDir=66000
;
; Localizable Strings
;
[Strings]
MS="Microsoft DDK Sample"
OEMSample="OEM DLL Print samples"
The error is ERROR_FILE_NOT_FOUND.
did you build the sample first?
after you built it, did you put it into the correct folder relative to the .inf file?
I also encountere this issue. The reason is: the file oem.gpd includes ttfsub.gpd, which cannot be found in the oemdll directory. But even if we copy ttfsub.gpd from FileRepsoitory to the oemdll directory, the installation will also failure.
However, if you install the bitmap example, you will succeed. So the correct way is to do like bitmap driver...
0x000002 refers to some missing file, that means there is a reference to the file in the inf file but it is not actually present in the driver package. Please check the driver package if all the files mentioned in the inf file are present in the package.

Determining a VS2010 WebService project from .csproj

I'm writing some PS to inspect .csproj files (for enforcing an SCM check-in policy)
Is the following check sufficient to determine if a .csproj is a WebService project?
# Check for WebProjectProperties (indicates project is a Web Service)
if ($xmldata.Project.ProjectExtensions.VisualStudio.FlavorProperties.WebProjectProperties -ne $null)
{
$isWebService = $true
}
The only alternative I've seen is parsing the Project.PropertyGroup.ProjectTypeGuids - but that seems overkill if this element is always set for a WS as well.
After digging a bit further, I'm (mostly) convinced. I've added this Dictionary:
# Visual Studio ProjectTypeGuid keys - store in a constant dictionary
# Courtesy of http://www.mztools.com/articles/2008/MZ2008017.aspx
New-Variable -Name ProjTypeMap -Option Constant -Value #{
"FAE04EC0-301F-11D3-BF4B-00C04F79EFBC" = "Windows (C#)";
"F184B08F-C81C-45F6-A57F-5ABD9991F28F" = "Windows (VB.NET)";
"8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942" = "Windows (Visual C++)";
"349C5851-65DF-11DA-9384-00065B846F21" = "Web Application";
"E24C65DC-7377-472B-9ABA-BC803B73C61A" = "Web Site";
"F135691A-BF7E-435D-8960-F99683D2D49C" = "Distributed System";
"3D9AD99F-2412-4246-B90B-4EAA41C64699" = "Windows Communication Foundation (WCF)";
"60DC8134-EBA5-43B8-BCC9-BB4BC16C2548" = "Windows Presentation Foundation (WPF)";
"C252FEB5-A946-4202-B1D4-9916A0590387" = "Visual Database Tools";
"A9ACE9BB-CECE-4E62-9AA4-C7E7C5BD2124" = "Database";
"4F174C21-8C12-11D0-8340-0000F80270F8" = "Database (other project types)";
"3AC096D0-A1C2-E12C-1390-A8335801FDAB" = "Test";
"20D4826A-C6FA-45DB-90F4-C717570B9F32" = "Legacy (2003) Smart Device (C#)";
"CB4CE8C6-1BDB-4DC7-A4D3-65A1999772F8" = "Legacy (2003) Smart Device (VB.NET)";
"4D628B5B-2FBC-4AA6-8C16-197242AEB884" = "Smart Device (C#)";
"68B1623D-7FB9-47D8-8664-7ECEA3297D4F" = "Smart Device (VB.NET)";
"14822709-B5A1-4724-98CA-57A101D1B079" = "Workflow Foundation 3.0 (C#)";
"D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8" = "Workflow Foundation 3.0 (VB.NET)";
"32f31d43-81cc-4c15-9de6-3fc5453562b6" = "Workflow Foundation 4.0";
"06A35CCD-C46D-44D5-987B-CF40FF872267" = "Deployment Merge Module";
"3EA9E505-35AC-4774-B492-AD1749C4943A" = "Deployment Cab";
"978C614F-708E-4E1A-B201-565925725DBA" = "Deployment Setup";
"AB322303-2255-48EF-A496-5904EB18DA55" = "Deployment Smart Device Cab";
"A860303F-1F3F-4691-B57E-529FC101A107" = "Visual Studio Tools for Applications (VSTA)";
"BAA0C2D2-18E2-41B9-852F-F413020CAA33" = "Visual Studio Tools for Office (VSTO)";
"F8810EC1-6754-47FC-A15F-DFABD2E3FA90" = "SharePoint Workflow";
"6D335F3A-9D43-41b4-9D22-F6F17C4BE596" = "XNA (Windows)";
"2DF5C3F4-5A5F-47a9-8E94-23B4456F55E2" = "XNA (XBox)";
"D399B71A-8929-442a-A9AC-8BEC78BB2433" = "XNA (Zune)";
"EC05E597-79D4-47f3-ADA0-324C4F7C7484" = "SharePoint (VB.NET)";
"593B0543-81F6-4436-BA1E-4747859CAAE2" = "SharePoint (C#)";
"A1591282-1198-4647-A2B1-27E5FF5F6F3B" = "Silverlight"
}
and look-up any ProjectTypeGuids encountered. This did flush out one more WebApp than just testing on Project.ProjectExtensions.VisualStudio.FlavorProperties.WebProjectProperties, so it is more robust.
The WebProjectProperties section also exists for web application projects.
The distinction seems to be whether the app.config (probably web.config too?) contains (non-empty) configuration/system.serviceModel/services/service/host sections.
This list has been very helpful ! Thx a lot.
I was only missing this Guid:
"EF7E3281-CD33-11D4-8326-00C04FA0CE8D" = "BizTalk"

WDF UMDF driver install problem in windows 7 32 bit

I have a simple user mode usb driver that is installing and working fine in Windows XP 32 bit and Windows 7 64 bit, but for some reason fails to install correctly in Windows 7 32 bit. Do I need 2 separate drivers for XP 32bit and win7 32bit? I was under the impression that i did not.
The inf file i use is listed below:
Update 6/10/2011, I've reworked the inf file as follows, seems to work in windows7 now, but on xp it asks me where /x86 is, when I give it a path, it prepends a \ to the begining, then i delete it and it works fine. I register the .inf file with windows using:
SetupCopyOEMInf(infFullPath, "", OemSourceMediaType.SPOST_PATH, 0, oemName, 255, ref temp, null))
infFullPath is the location under program files where I copy the driver package.
Can anyone see why this wouldn't work
I store the files as follows:
AbcRadio.inf
\x86\AbcRadio.dll
\x86\WudfUpdate_01009.dll
\x86\WdfCoInstaller01009.dll
\x86\WinUsbCoinstaller2.dll
\x64\AbcRadio.dll
\x64\WudfUpdate_01009.dll
\x64\WdfCoInstaller01009.dll
\x64\WinUsbCoinstaller2.dll
;
; AbcRadio.inf - Install the AbcRadio USB user-mode driver
;
[Version]
Signature="$Windows NT$"
Class=Radio
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFTUMDF%
DriverVer=06/09/2011,6.1.7600.16385
CatalogFile=wudf.cat
; ================== Class section ==================
[ClassInstall32]
AddReg=SampleClass_RegistryAdd
[SampleClass_RegistryAdd]
HKR,,,,%ClassName%
HKR,,Icon,,"-10"
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%MSFTUMDF%=Abc,NTX86,NTAMD64
[Abc.NTX86]
%AbcRadioUsbDeviceName%=AbcRadioUsb_Install, USB\VID_16D4&PID_1002
%AbcRadioUsbDeviceName%=AbcRadioUsb_Install, USB\VID_16D4&PID_1004
[Abc.NTAMD64]
%AbcRadioUsbDeviceName%=AbcRadioUsb_Install, USB\VID_16D4&PID_1002
%AbcRadioUsbDeviceName%=AbcRadioUsb_Install, USB\VID_16D4&PID_1004
; =================== Installation ===================
[AbcRadioUsb_Install]
CopyFiles=UMDriverCopy
Include=WINUSB.INF ; Import installation sections from WINUSB.INF
Needs=WINUSB.NT ; Run the CopyFiles & AddReg directives for WinUsb.INF
[AbcRadioUsb_Install.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall ; this service is installed because its a filter.
[WinUsb_ServiceInstall]
DisplayName = %WinUsb_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
LoadOrderGroup = Base
[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys
LoadOrderGroup = Base
[AbcRadioUsb_Install.Wdf]
UmdfDispatcher = WinUsb
UmdfService = AbcRadio, WUDFAbcRadioUsbDriver_Install
UmdfServiceOrder = AbcRadio
KmdfService = WINUSB, WinUsb_Install
[WinUsb_Install]
KmdfLibraryVersion = 1.9
[AbcRadioUsb_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles
[AbcRadioUsb_Install.hw]
AddReg=AbcRadioUsb_Device_AddReg
[AbcRadioUsb_Device_AddReg]
HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfUpdate_01009.dll", "WinUsbCoinstaller2.dll", "WdfCoInstaller01009.dll,WdfCoInstaller"
[WUDFAbcRadioUsbDriver_Install]
UmdfLibraryVersion=1.9.0
DriverCLSID="{7bf5cb94-b686-4721-955e-878e48933a2c}"
ServiceBinary=%12%\UMDF\AbcRadio.dll
[CoInstallers_CopyFiles]
WudfUpdate_01009.dll
WdfCoInstaller01009.dll
WinUsbCoinstaller2.dll
[UMDriverCopy]
AbcRadio.dll
[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
CoInstallers_CopyFiles=11 ; copy to system32
; ================= Source Media Section =====================
[SourceDisksNames]
1 = %MediaDescription%,,,
[SourceDisksFiles.x86]
AbcRadio.dll=1,x86
WudfUpdate_01009.dll=1,x86
WdfCoInstaller01009.dll=1,x86
WinUsbCoinstaller2.dll=1,x86
[SourceDisksFiles.amd64]
AbcRadio.dll=1,x64
WudfUpdate_01009.dll=1,x64
WdfCoInstaller01009.dll=1,x64
WinUsbCoinstaller2.dll=1,x64
; =================== Generic ==================================
[Strings]
MSFTUMDF="Abc (WDF:UMDF)"
MediaDescription="Abc Media"
ClassName="Radio"
WudfRdDisplayName="Abc WDF:UMDF Radio"
AbcRadioUsbDeviceName="Abc Radio Alpha 6/10/2011 8:53 AM"
WinUsb_SvcDesc="WinUSB Driver"
Figured out that I didnt read the documentation for SetupCopyOEMInf() fully. The following line in my installer solved the final problem:
SetupCopyOEMInf(infFullPath, installPath, OemSourceMediaType.SPOST_PATH, 0, oemName, 255, ref temp, null)
It seems that windows 7 guesses that your source disk is the location where the inf file is, if you dont specify the OEMSourceMediaLocation parameter. Windows XP does not do this, so it needs to be populated if you want Windows to know where to look for your driver.

Resources