From: uba on
Hi All,

When I try to install disk upper filter driver (through INF File) for
my USB mass storage device, the device name changes to "Disk Drive".
This happens in Win 7, but not in Win XP or Vista. The default disk
name is like "ATA XXXX". I want the original name after installing the
driver. I do not have "Display Name" in Add Service directive.

Which section in the INF handles the change of display name?

Any information is helpful.

Thanks nd Regards,
Kid

From: Tim Roberts on
uba <kid07.uba(a)gmail.com> wrote:
>
>When I try to install disk upper filter driver (through INF File) for
>my USB mass storage device, the device name changes to "Disk Drive".

How did you write an INF for a filter driver? Can you post the INF? If
you write an INF that includes the primary driver AND installs a filter,
then you are replacing the original driver. It gets whatever friendly name
you install.

If you write this:

[xxxx.Service]
AddService = servicename, 2, Service_Section

The "2" in there says "make this the 'associated' service for this device".
For filter, you don't want that.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: uba on

> The "2" in there says "make this the 'associated' service for this device".
> For filter, you don't want that.

I do not have "Associated Service" in directive for the device. As I
mentioned in my earlier mail that this issue happens only in Win 7 but
not in Win XP/Vista. Here is the INF file.

[Version]
Signature = "$CHICAGO$"
Class = DiskDrive
ClassGuid = {4D36E967-E325-11CE-BFC1-08002BE10318}
Provider = %CNGS%
DriverVer = 04/05/2010,6.7500.0.6
CatalogFile = ufilter.cat

[DestinationDirs]
DefaultDestDir = 12

[Manufacturer]
%StdMfg%=Standard,NTx86

[Standard]
; DisplayName Section DeviceId
; ----------- ------- --------
%ufilter.DeviceDesc%=ufilter, USBSTOR\DiskATA_____

[Standard.NTx86]
%ufilter.DeviceDesc%=ufilter, USBSTOR\DiskATA_____

[ufilter.NT]
;Include=disk.inf
;Needs=disk_install
CopyFiles=ufilter.NT.Copy

[ufilter.NT.Copy]
ufilter.sys

[ufilter.NT.HW]
;Include=disk.inf
;Needs=disk_install
AddReg = ufilter.NT.HW.AddReg

[ufilter.NT.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"ufilter"

[ufilter.NT.Services]
AddService = ufilter,, filter_Service_Inst

[filter_Service_Inst]
;DisplayName = %filter.SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\ufilter.sys

[SourceDisksNames]
1 = %DiskId1%,,,""

[SourceDisksFiles]
ufilter.sys = 1,,

[DestinationDirs]
ufilter_CoInstaller_CopyFiles = 11

[ufilter.NT.CoInstallers]
AddReg = ufilter_CoInstaller_AddReg
CopyFiles = ufilter_CoInstaller_CopyFiles

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

[ufilter_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll

[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with
SourceDisksNames

[ufilter.NT.Wdf]
KmdfService = ufilter, Filter_wdfsect

[Filter_wdfsect]
KmdfLibraryVersion = 1.9

[Strings]
CNGS = "CNGS Corp"
StdMfg = "CNGS Corp"
DiskId1 = "Upper Filter Installation Disk"
ufilter.DeviceDesc = "Upper Filter Driver"
filter.SvcDesc = "Upper Filter Driver"


From: uba on
Hi Tim,

Did you get a chance to look at the INF file. Is there anything wrong
in the INF file.

Thanks nd Regards,
Kid
From: Tim Roberts on
uba <kid07.uba(a)gmail.com> wrote:
>
>I do not have "Associated Service" in directive for the device. As I
>mentioned in my earlier mail that this issue happens only in Win 7 but
>not in Win XP/Vista. Here is the INF file.

What you're doing here is not correct. You cannot use a PnP INF file to
add a filter driver to an existing device. When a new device appears,
device manager runs through all of the INFs to find the ONE best match, and
then installs that. If your INF happens to be chosen for your disk, you
won't have a function driver at all, because you aren't doing the
"disk_install".

When an INF matches, that becomes "THE" INF for the device. The name
therein will become the device's name. The fact that it happens to work in
XP and Vista is just an accident, because your device had already been
installed.

To install a filter driver, use a simple SetupDi application to find the
device, and then write the UpperFilters key using
SetupDiSetDeviceRegistryProperty.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.