Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren

The sample in general\ioctl\kmdf has an install program that installs via
SCM and installs the KMDF frameworks. This was previously in the nonpnp
sample.

How are you setting up to filter the keyboard/mouse?

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 2:53 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren


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

SCM = service control manager?

There is also an OSR article on WDF filter drivers that covers installation:
http://www.osronline.com/article.cfm?article=446

The problem is that you need to call some functions in the wdf coinstaller
that take as a parameter the path to an inf file, so even if you are using
SCM to install you have to create an inf anyhow (at this stage I reckon it
is just easier to use dpinst for wdf drivers).

On Tue, Sep 7, 2010 at 8:32 AM, Bill Wandel wrote:

> The sample in general\ioctl\kmdf has an install program that installs via
> SCM and installs the KMDF frameworks. This was previously in the nonpnp
> sample.
>
> How are you setting up to filter the keyboard/mouse?
>
>
>
> Bill Wandel
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com]
> On Behalf Of Soren Dreijer
> Sent: Monday, September 06, 2010 2:53 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Making sure the WDF framework is installed
>
>
>
> A while ago I asked about the best way to install my input filter drivers
> (keyboard and mouse) on a target system and I was recommended to simply do
> it manually by using SCM. The filter drivers are built with WDF and
> therefore depend on KMDF, so it dawns on me, how do I make sure the
> framework is properly installed?
>
>
>
> There was a post a while back talking about dpinst for WiX (which we use),
> but I’m not sure if that’s the best solution if I’m not installing the
> driver through that package but really only WDF.
>
>
>
> Thanks,
>
> Soren
>
>
> —
> 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
>
>
>
> —
> 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
>

On Tue, Sep 7, 2010 at 12:01 AM, Daniel Newton wrote:
> The problem is that you need to call some functions in the wdf coinstaller
> that take as a parameter the path to an inf file, so even if you are using
> SCM to install you have to create an inf anyhow (at this stage I reckon it
> is just easier to use dpinst for wdf drivers).

You need an inf to install WDF and/or WDF drivers, even if the drivers
are non-pnp and can be started by the SCM.


Aram Hăvărneanu

The WDK has an example, even source code, that will install the WDF. Look
for the NonPnp sample.

Gary G. Little

H (952) 223-1349

C (952) 454-4629

xxxxx@comcast.net

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Daniel Newton
Sent: Monday, September 06, 2010 4:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Making sure the WDF framework is installed

SCM = service control manager?

There is also an OSR article on WDF filter drivers that covers installation:
http://www.osronline.com/article.cfm?article=446

The problem is that you need to call some functions in the wdf coinstaller
that take as a parameter the path to an inf file, so even if you are using
SCM to install you have to create an inf anyhow (at this stage I reckon it
is just easier to use dpinst for wdf drivers).

On Tue, Sep 7, 2010 at 8:32 AM, Bill Wandel wrote:

The sample in general\ioctl\kmdf has an install program that installs via
SCM and installs the KMDF frameworks. This was previously in the nonpnp
sample.

How are you setting up to filter the keyboard/mouse?

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 2:53 PM

To: Windows System Software Devs Interest List

Subject: [ntdev] Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren


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



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

— 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

The sample that I referenced shows how to install the KMDF framework if you
are using SCM to install the driver. This is for a legacy type driver. A
class filter is installed like a legacy driver plus you need to set up the
class so your driver gets attached to that class. The sample is a better
place to look then the OSR article that you reference. What I have done is
to add the stuff from nonpnp.inf to the class install inf. If your installer
adds the class registry entries directly then merge that code with the
sample install that I referenced.

You can’t install a class filter by just using the osr loader or the sc
command line program.

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Daniel Newton
Sent: Monday, September 06, 2010 5:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Making sure the WDF framework is installed

SCM = service control manager?

There is also an OSR article on WDF filter drivers that covers installation:
http://www.osronline.com/article.cfm?article=446

The problem is that you need to call some functions in the wdf coinstaller
that take as a parameter the path to an inf file, so even if you are using
SCM to install you have to create an inf anyhow (at this stage I reckon it
is just easier to use dpinst for wdf drivers).

On Tue, Sep 7, 2010 at 8:32 AM, Bill Wandel wrote:

The sample in general\ioctl\kmdf has an install program that installs via
SCM and installs the KMDF frameworks. This was previously in the nonpnp
sample.

How are you setting up to filter the keyboard/mouse?

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 2:53 PM

To: Windows System Software Devs Interest List

Subject: [ntdev] Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren


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



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

— 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

Hi all,

Thanks for all the responses. Unfortunately, they have made me slightly
confused as they seem to go against the previous recommendations I received:
http://www.osronline.com/showthread.cfm?link=184915

What I’m currently doing is simply copying my filter drivers to the Drivers
folder and installing them using SCM. This works just fine – whether that’s
by coincidence or not. The drivers are upper filters to the keyboard and
mouse class filters.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill Wandel
Sent: Monday, September 06, 2010 4:32 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Making sure the WDF framework is installed

The sample that I referenced shows how to install the KMDF framework if you
are using SCM to install the driver. This is for a legacy type driver. A
class filter is installed like a legacy driver plus you need to set up the
class so your driver gets attached to that class. The sample is a better
place to look then the OSR article that you reference. What I have done is
to add the stuff from nonpnp.inf to the class install inf. If your installer
adds the class registry entries directly then merge that code with the
sample install that I referenced.

You can’t install a class filter by just using the osr loader or the sc
command line program.

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Daniel Newton
Sent: Monday, September 06, 2010 5:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Making sure the WDF framework is installed

SCM = service control manager?

There is also an OSR article on WDF filter drivers that covers installation:
http://www.osronline.com/article.cfm?article=446

The problem is that you need to call some functions in the wdf coinstaller
that take as a parameter the path to an inf file, so even if you are using
SCM to install you have to create an inf anyhow (at this stage I reckon it
is just easier to use dpinst for wdf drivers).

On Tue, Sep 7, 2010 at 8:32 AM, Bill Wandel wrote:

The sample in general\ioctl\kmdf has an install program that installs via
SCM and installs the KMDF frameworks. This was previously in the nonpnp
sample.

How are you setting up to filter the keyboard/mouse?

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 2:53 PM

To: Windows System Software Devs Interest List

Subject: [ntdev] Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren


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



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

— 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


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

Your original message asked about installing the KMDF framework. The sample
shows how to do this for a legacy type driver. A class filter is installed
like a legacy driver. The install sample in the ioctl sample shows how to do
this. Since your driver is a class filter you need to add the code that adds
the upper filter entry to the registry to this sample.
You can either use an inf to update the class section of the registry or
update it in your setup program. The choice is yours. Apparently you
currently do it in your setup program so just use the ioctl install sample
as a guide to how to install the framework.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 11:16 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Making sure the WDF framework is installed

Hi all,

Thanks for all the responses. Unfortunately, they have made me slightly
confused as they seem to go against the previous recommendations I received:
http://www.osronline.com/showthread.cfm?link=184915

What I’m currently doing is simply copying my filter drivers to the Drivers
folder and installing them using SCM. This works just fine – whether that’s
by coincidence or not. The drivers are upper filters to the keyboard and
mouse class filters.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill Wandel
Sent: Monday, September 06, 2010 4:32 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Making sure the WDF framework is installed

The sample that I referenced shows how to install the KMDF framework if you
are using SCM to install the driver. This is for a legacy type driver. A
class filter is installed like a legacy driver plus you need to set up the
class so your driver gets attached to that class. The sample is a better
place to look then the OSR article that you reference. What I have done is
to add the stuff from nonpnp.inf to the class install inf. If your installer
adds the class registry entries directly then merge that code with the
sample install that I referenced.

You can’t install a class filter by just using the osr loader or the sc
command line program.

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Daniel Newton
Sent: Monday, September 06, 2010 5:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Making sure the WDF framework is installed

SCM = service control manager?

There is also an OSR article on WDF filter drivers that covers installation:
http://www.osronline.com/article.cfm?article=446

The problem is that you need to call some functions in the wdf coinstaller
that take as a parameter the path to an inf file, so even if you are using
SCM to install you have to create an inf anyhow (at this stage I reckon it
is just easier to use dpinst for wdf drivers).

On Tue, Sep 7, 2010 at 8:32 AM, Bill Wandel wrote:

The sample in general\ioctl\kmdf has an install program that installs via
SCM and installs the KMDF frameworks. This was previously in the nonpnp
sample.

How are you setting up to filter the keyboard/mouse?

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 2:53 PM

To: Windows System Software Devs Interest List

Subject: [ntdev] Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren


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



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

— 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


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


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

Alright, I’ll give it a shot. Thanks for the detailed explanation!

Soren

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill Wandel
Sent: Tuesday, September 07, 2010 6:45 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Making sure the WDF framework is installed

Your original message asked about installing the KMDF framework. The sample
shows how to do this for a legacy type driver. A class filter is installed
like a legacy driver. The install sample in the ioctl sample shows how to do
this. Since your driver is a class filter you need to add the code that adds
the upper filter entry to the registry to this sample.
You can either use an inf to update the class section of the registry or
update it in your setup program. The choice is yours. Apparently you
currently do it in your setup program so just use the ioctl install sample
as a guide to how to install the framework.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 11:16 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Making sure the WDF framework is installed

Hi all,

Thanks for all the responses. Unfortunately, they have made me slightly
confused as they seem to go against the previous recommendations I received:
http://www.osronline.com/showthread.cfm?link=184915

What I’m currently doing is simply copying my filter drivers to the Drivers
folder and installing them using SCM. This works just fine – whether that’s
by coincidence or not. The drivers are upper filters to the keyboard and
mouse class filters.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill Wandel
Sent: Monday, September 06, 2010 4:32 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Making sure the WDF framework is installed

The sample that I referenced shows how to install the KMDF framework if you
are using SCM to install the driver. This is for a legacy type driver. A
class filter is installed like a legacy driver plus you need to set up the
class so your driver gets attached to that class. The sample is a better
place to look then the OSR article that you reference. What I have done is
to add the stuff from nonpnp.inf to the class install inf. If your installer
adds the class registry entries directly then merge that code with the
sample install that I referenced.

You can’t install a class filter by just using the osr loader or the sc
command line program.

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Daniel Newton
Sent: Monday, September 06, 2010 5:02 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Making sure the WDF framework is installed

SCM = service control manager?

There is also an OSR article on WDF filter drivers that covers installation:
http://www.osronline.com/article.cfm?article=446

The problem is that you need to call some functions in the wdf coinstaller
that take as a parameter the path to an inf file, so even if you are using
SCM to install you have to create an inf anyhow (at this stage I reckon it
is just easier to use dpinst for wdf drivers).

On Tue, Sep 7, 2010 at 8:32 AM, Bill Wandel wrote:

The sample in general\ioctl\kmdf has an install program that installs via
SCM and installs the KMDF frameworks. This was previously in the nonpnp
sample.

How are you setting up to filter the keyboard/mouse?

Bill Wandel

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of Soren Dreijer
Sent: Monday, September 06, 2010 2:53 PM

To: Windows System Software Devs Interest List

Subject: [ntdev] Making sure the WDF framework is installed

A while ago I asked about the best way to install my input filter drivers
(keyboard and mouse) on a target system and I was recommended to simply do
it manually by using SCM. The filter drivers are built with WDF and
therefore depend on KMDF, so it dawns on me, how do I make sure the
framework is properly installed?

There was a post a while back talking about dpinst for WiX (which we use),
but I’m not sure if that’s the best solution if I’m not installing the
driver through that package but really only WDF.

Thanks,

Soren


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



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

— 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


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


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


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

Aram Hăvărneanu wrote:

On Tue, Sep 7, 2010 at 12:01 AM, Daniel Newton wrote:
>> The problem is that you need to call some functions in the wdf coinstaller
>> that take as a parameter the path to an inf file, so even if you are using
>> SCM to install you have to create an inf anyhow (at this stage I reckon it
>> is just easier to use dpinst for wdf drivers).
> You need an inf to install WDF and/or WDF drivers, even if the drivers
> are non-pnp and can be started by the SCM.

That’s not true.

Well, OK, technically I suppose it is true, but not in the way most
people will take it. The general\ioctl\kmdf sample in the DDK
demostrates how to install a non-PnP WDF driver using an installation
application. The installation application uses a 6-line dummy INF file
to satisfy the WDF co-installer, but the INF file can be deleted
immediately thereafter. My non-PnP WDF installer creates this INF file
on the fly.


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