How to install a low filter driver with no inf file but by simply the registry?

Here, i want to install my test low filter driver to the system but im
not sure how to install it by a inf file. The driver can’t be used by
CreateService and StartService mode.So, i have to modify the registry
and make it load by the system while starting. Of course i know how to
modify the registry, only a few. And i had tried to modify the registry
by hand and make the driver loaded and worked well. But, these registry
entries are all need administrator privilege, so i use normal
RegCreateKeyEx will fail with error code 5(access denied). I know i
should use acl, but failed.
And anyone has a tested way to do such a task?Thanks.

Regards.

Did you look at the diskperf and addfilter samples in the WDK?
Mark Roddy

On Mon, Dec 8, 2008 at 5:42 PM, xiaosan wrote:

> Here, i want to install my test low filter driver to the system but im not
> sure how to install it by a inf file. The driver can’t be used by
> CreateService and StartService mode.So, i have to modify the registry and
> make it load by the system while starting. Of course i know how to modify
> the registry, only a few. And i had tried to modify the registry by hand and
> make the driver loaded and worked well. But, these registry entries are all
> need administrator privilege, so i use normal RegCreateKeyEx will fail with
> error code 5(access denied). I know i should use acl, but failed.
> And anyone has a tested way to do such a task?Thanks.
>
> Regards.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

xiaosan wrote:

Here, i want to install my test low filter driver to the system but im
not sure how to install it by a inf file. The driver can’t be used by
CreateService and StartService mode.So, i have to modify the registry
and make it load by the system while starting. Of course i know how to
modify the registry, only a few. And i had tried to modify the
registry by hand and make the driver loaded and worked well. But,
these registry entries are all need administrator privilege, so i use
normal RegCreateKeyEx will fail with error code 5(access denied). I
know i should use acl, but failed.
And anyone has a tested way to do such a task?Thanks.

Are you installing device lower filter (as opposed to a class filter)?
If so, then you can use SetupDiSetDeviceRegistryProperty to do this in
an installer app. The INF is the recommended way, but if this is for
testing, a small installer program will work fine.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts wrote:

xiaosan wrote:
> Here, i want to install my test low filter driver to the system but im
> not sure how to install it by a inf file. The driver can’t be used by
> CreateService and StartService mode.So, i have to modify the registry
> and make it load by the system while starting. Of course i know how to
> modify the registry, only a few. And i had tried to modify the
> registry by hand and make the driver loaded and worked well. But,
> these registry entries are all need administrator privilege, so i use
> normal RegCreateKeyEx will fail with error code 5(access denied). I
> know i should use acl, but failed.
> And anyone has a tested way to do such a task?Thanks.

Are you installing device lower filter (as opposed to a class filter)?
If so, then you can use SetupDiSetDeviceRegistryProperty to do this in
an installer app. The INF is the recommended way, but if this is for
testing, a small installer program will work fine.

yes, this is just a test driver. im a beginner of driver programming, i
have not any idea to write a inf file yet, with only some basic concepts
of wdm. I think i will learn it latter, but i found a way to use
regini(published with xp and vista) to modify the privileges of any
registry key under admin account.
Thanks.

xiaosan wrote:

>
yes, this is just a test driver. im a beginner of driver programming,
i have not any idea to write a inf file yet, with only some basic
concepts of wdm. I think i will learn it latter, but i found a way to
use regini(published with xp and vista) to modify the privileges of
any registry key under admin account.

Although that will work, in my opinion it would be well worth your time
to learn how to use the SetupDi APIs to make this change “legally”, in
the documented and supported manner. It’s not that hard, and it means
you don’t have to endanger the security of the systems you use for testing.

I used to think driver installation was somehow a “lower-order” task,
one that was beneath me, and not worth worrying about until I was forced
to do so. Since then, I have changed my mind. I’ve started trying to
do my driver installs the right way, right from the very start, using
things like DPInst and the SetupDi APIs. What I’ve found is that this
gives me a “user experience” that is much closer to the experience that
my clients and end users will have, and it means I don’t have to deliver
any more lengthy emails with complicated batch files to adjust
priorities and copy files around.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.