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
|
|
0
|
|
|
|
Reply
|
uba
|
4/5/2010 12:16:46 PM |
|
uba <kid07.uba@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@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
4/6/2010 4:17:13 AM
|
|
> 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"
|
|
0
|
|
|
|
Reply
|
uba
|
4/6/2010 10:55:11 AM
|
|
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
|
|
0
|
|
|
|
Reply
|
uba
|
4/7/2010 6:01:17 PM
|
|
uba <kid07.uba@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@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
4/8/2010 4:36:14 AM
|
|
> What you're doing here is not correct. =A0You cannot use a PnP INF file t=
o
> add a filter driver to an existing device. =A0When a new device appears,
> device manager runs through all of the INFs to find the ONE best match, a=
nd
> then installs that. =A0If your INF happens to be chosen for your disk, yo=
u
> won't have a function driver at all, because you aren't doing the
> "disk_install".
Thanks for the reply. I had intially tried with "disk_install" and I
saw the problem. Then I tried commenting it out. I missed to un-
comment those lines. Anyhow, with "disk_install" I think I can use INF
way of installing the filter driver. What is your suggestion?
>
> When an INF matches, that becomes "THE" INF for the device. =A0The name
> therein will become the device's name. =A0The fact that it happens to wor=
k 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.
I'm confused how I can use SetupDi function to find the device because
the hardware id is not fixed. It may vary from one device to another.
At present it is "ATA XXX". However, the hardware id of USB is fixed.
Is there a way I can find the child disk PDO that was enumerated by
USBSTOR.
Thanks nd Regards,
Kid
|
|
0
|
|
|
|
Reply
|
uba
|
4/8/2010 6:03:30 AM
|
|
I think the "Friendly Name/Display Name" ("Disk Drive") that is shown
is coming from disk.inf file.
What change I need to do in my filter INF file so that the default
friendly name is used?
Thanks nd Regards,
Kid
|
|
0
|
|
|
|
Reply
|
uba
|
4/9/2010 10:09:33 AM
|
|
uba <kid07.uba@gmail.com> wrote:
>>
>> To install a filter driver, use a simple SetupDi application to find the
>> device, and then write the UpperFilters key using
>> SetupDiSetDeviceRegistryProperty.
>
>I'm confused how I can use SetupDi function to find the device because
>the hardware id is not fixed. It may vary from one device to another.
>At present it is "ATA XXX". However, the hardware id of USB is fixed.
You would use SetupDiGetClassDevs to fetch the collection of all disk class
devices, then SetupDiEnumDeviceInfo to enumerate the list, then
CM_Get_Device_ID to get the device IDs until you find the one you want.
Then you use SetupDiSetDeviceRegistryProperty to add your filter to the
list. (Well, you have to Get the property first to make sure you aren't
already there.)
>Is there a way I can find the child disk PDO that was enumerated by
>USBSTOR.
What good would the PDO do you?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
4/10/2010 3:17:31 AM
|
|
uba <kid07.uba@gmail.com> wrote:
>
>I think the "Friendly Name/Display Name" ("Disk Drive") that is shown
>is coming from disk.inf file.
>
>What change I need to do in my filter INF file so that the default
>friendly name is used?
You can't install a filter with an INF file. You can install function PLUS
filter, but then the friendly name comes from your INF file.
Do the install with a simple application. Much simpler.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
4/10/2010 3:18:34 AM
|
|
What if you are using WLK to test a filter driver only? It asks for the INF file of your driver.
On 04/09/2010 20:18:34:648 Tim Roberts <timr@probo.com> wrote:
>
> uba <kid07.uba@gmail.com> wrote:
> >
> >I think the "Friendly Name/Display Name" ("Disk Drive") that is shown
> >is coming from disk.inf file.
> >
> >What change I need to do in my filter INF file so that the default
> >friendly name is used?
>
> You can't install a filter with an INF file. You can install function PLUS
> filter, but then the friendly name comes from your INF file.
>
> Do the install with a simple application. Much simpler.
|
|
0
|
|
|
|
Reply
|
Tucker
|
4/11/2010 10:01:33 PM
|
|
Tucker <nothing@nowhere.com> wrote:
>
>What if you are using WLK to test a filter driver only? It asks for the INF file of your driver.
The phrase "filter driver" is overloaded and can mean one of several
different things. The disk stack is not where I normally live, so before I
give a pot of bad advice, I'll let someone else respond.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
|
|
0
|
|
|
|
Reply
|
Tim
|
4/12/2010 1:12:55 AM
|
|
>
> You would use SetupDiGetClassDevs to fetch the collection of all disk cla=
ss
> devices, then SetupDiEnumDeviceInfo to enumerate the list, then
> CM_Get_Device_ID to get the device IDs until you find the one you want.
> Then you use SetupDiSetDeviceRegistryProperty to add your filter to the
> list. =A0(Well, you have to Get the property first to make sure you aren'=
t
> already there.)
>
I do not have any idea what the device Id would be for the disk device
that is enumerated. It could vary from one device to other. So, I
would like to know the disk ID from my USB device. The child device ID
that my USB device had enumerated.
Is this the way to get the disk ID.
Thanks nd Regars,
Kid
|
|
0
|
|
|
|
Reply
|
uba
|
4/12/2010 11:38:02 AM
|
|
|
11 Replies
360 Views
(page loaded in 0.004 seconds)
|