How to install the test driver on a Windows 7.

Hi,

I am new in WDK develop for Windows 7.

I wrote a USB Hid KMDF driver for our device. Following the WDK document
and sample code, I use this driver as filter driver for hidkmdf.sys. I
modified the INF file. I setup a series port connection and turned debug
on for the target computer (it runs windows 7 intel 64). Since there is
no fond new device wizard in Windows 7, I don’t know how to install my
test driver to the system. When I plug our device into a USB, the system
automatic load hid driver for it. I tried to update the driver, it seems
not work. Do I have to write an install api for it? Is there any simple
way to install the test driver?

Also, I don’t have a signature for the driver now. Is it okay for the
test? I just simply comment the signature item in INF file. Is it
correct?

Thanks for help.

Bob

You need to test sign the driver, take a look at
src\general\build\driversigning to do this. There is an add new
hardware wizard, the simplest way to find it is go into device manager,
click the computer at the top of the tree, and under actions choose “Add
legacy Hardware”

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@Grayhill.com” wrote in message
news:xxxxx@ntdev:

> Hi,
>
> I am new in WDK develop for Windows 7.
>
> I wrote a USB Hid KMDF driver for our device. Following the WDK document
> and sample code, I use this driver as filter driver for hidkmdf.sys. I
> modified the INF file. I setup a series port connection and turned debug
> on for the target computer (it runs windows 7 intel 64). Since there is
> no fond new device wizard in Windows 7, I don’t know how to install my
> test driver to the system. When I plug our device into a USB, the system
> automatic load hid driver for it. I tried to update the driver, it seems
> not work. Do I have to write an install api for it? Is there any simple
> way to install the test driver?
>
> Also, I don’t have a signature for the driver now. Is it okay for the
> test? I just simply comment the signature item in INF file. Is it
> correct?
>
> Thanks for help.
>
> Bob

Hi Don,

Thanks for your help.

My wdk is version 7600.16385.1 and runing on a Windows XP . In the
directory bin\selfsign directory, there is only inf2cat tool. There are
all other tools in the directory bin\amd64 and bin\ia64 directories. When
I tried run the Makecert in a build environment command windows, I got a "
Makecert is not a valid win32 application error massage". Did I do
something wrong? By the way , the storename which is in the Makecert
command option could be any name. Am I right?

Bob

From: “Don Burn”
To: “Windows System Software Devs Interest List”
Date: 06/20/2012 12:44 PM
Subject: Re:[ntdev] How to install the test driver on a Windows 7.
Sent by: xxxxx@lists.osr.com

You need to test sign the driver, take a look at
src\general\build\driversigning to do this. There is an add new
hardware wizard, the simplest way to find it is go into device manager,
click the computer at the top of the tree, and under actions choose “Add
legacy Hardware”

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@Grayhill.com” wrote in message
news:xxxxx@ntdev:

> Hi,
>
> I am new in WDK develop for Windows 7.
>
> I wrote a USB Hid KMDF driver for our device. Following the WDK
document
> and sample code, I use this driver as filter driver for hidkmdf.sys. I
> modified the INF file. I setup a series port connection and turned
debug
> on for the target computer (it runs windows 7 intel 64). Since there is
> no fond new device wizard in Windows 7, I don’t know how to install my
> test driver to the system. When I plug our device into a USB, the system
> automatic load hid driver for it. I tried to update the driver, it seems
> not work. Do I have to write an install api for it? Is there any simple
> way to install the test driver?
>
> Also, I don’t have a signature for the driver now. Is it okay for the
> test? I just simply comment the signature item in INF file. Is it
> correct?
>
> Thanks for help.
>
> Bob


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

xxxxx@Grayhill.com wrote:

My wdk is version 7600.16385.1 and runing on a Windows XP . In the
directory bin\selfsign directory, there is only inf2cat tool. There
are all other tools in the directory bin\amd64 and bin\ia64
directories. When I tried run the Makecert in a build environment
command windows, I got a " Makecert is not a valid win32 application
error massage". Did I do something wrong?

You always need to use the x86 version of the tools on a 32-bit system.

However, you cannot use a self-generated certificate for the KMCS
signature on 64-bit systems unless you turn off the driver signing check
at boot time. If you’re going to do driver development, then you need
to invest in a real Class 3 Code-Signing Certificate from one of the
approved vendors.


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

Hi Tim,

Okay, I should run the tools in X86 since I am running 32 bit system.

I am confused here.

According the documents, I can do the driver test without an official
signing. So If I follow the instructions in the self signing (
src\general\build\driversigning), can I install the test driver on the
test system ( A windows 7 intel 64) ? Do I have to turn off the signing
check on the target system? Also I am using a Windows XP as develop
systemto develop a Windows 7 64 bit driver. Does it cause any problem to
do the develop, testing or self signing?

Since we did not decide using a KMDF driver or not for the HID device, so
for now I just do some test…

Thank you very much for your help.

Bob

From: Tim Roberts
To: “Windows System Software Devs Interest List”
Date: 06/20/2012 04:02 PM
Subject: Re: [ntdev] How to install the test driver on a Windows 7.
Sent by: xxxxx@lists.osr.com

xxxxx@Grayhill.com wrote:
>
> My wdk is version 7600.16385.1 and runing on a Windows XP . In the
> directory bin\selfsign directory, there is only inf2cat tool. There
> are all other tools in the directory bin\amd64 and bin\ia64
> directories. When I tried run the Makecert in a build environment
> command windows, I got a " Makecert is not a valid win32 application
> error massage". Did I do something wrong?

You always need to use the x86 version of the tools on a 32-bit system.

However, you cannot use a self-generated certificate for the KMCS
signature on 64-bit systems unless you turn off the driver signing check
at boot time. If you’re going to do driver development, then you need
to invest in a real Class 3 Code-Signing Certificate from one of the
approved vendors.


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


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

xxxxx@Grayhill.com wrote:

I am confused here.

According the documents, I can do the driver test without an official
signing. So If I follow the instructions in the self signing (
src\general\build\driversigning), can I install the test driveron the
test system ( A windows 7 intel 64) ? Do I have to turn off the
signing check on the target system?

There are two different signature checks at work here, with different
requirements. There is one signature check at INSTALL time. That’s the
one that presents the dialog box saying “warning, this driver is
unsigned”. This check is done on all the systems, and has been there
since XP. It is just a warning – if you say “OK”, then the
installation proceeds and you are not bothered again. That’s where
“test signing” is usually done.

The other check is KMCS (kernel-mode code signing), and applies only to
the 64-bit systems. The KMCS check is done at LOAD time, and it is done
EVERY time your driver loads. There is no dialog and no warning – it
will simply refuse to load your driver if it is not signed. This is the
check that you can override at boot time. A test signature is not
enough here. You must have a genuine certificate from one of the
approved certificate authorities.

Also I am using a Windows XP as develop systemto develop a Windows 7
64 bit driver. Does it cause any problem to do the develop, testing
or self signing?

No. I do all of my development on XP. Please remember, however, that
an “Intel 64 system” is called x64 or amd64. Do not use “ia64”, ever.


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

Using WinXP as development system for Win7 x64 is totally OK.

But when you write “Intel 64” is this AMD64 (a.k.a. x64)?
Otherwise (IA64) you might have a huge problem.

– pa

On 21-Jun-2012 01:04, xxxxx@Grayhill.com wrote:

Hi Tim,

Okay, I should run the tools in X86 since I am running 32 bit system.

I am confused here.

According the documents, I can do the driver test without an official
signing. So If I follow the instructions in the self signing (
src\general\build\driversigning), can I install the test driver on the
test system ( A windows 7 intel 64) ? Do I have to turn off the signing
check on the target system? Also I am using a Windows XP as develop
system to develop a Windows 7 64 bit driver. Does it cause any problem
to do the develop, testing or self signing?

Since we did not decide using a KMDF driver or not for the HID device,
so for now I just do some test…

Thank you very much for your help.

Bob

From: Tim Roberts
> To: “Windows System Software Devs Interest List”
> Date: 06/20/2012 04:02 PM
> Subject: Re: [ntdev] How to install the test driver on a Windows 7.
> Sent by: xxxxx@lists.osr.com
> ------------------------------------------------------------------------
>
>
>
> xxxxx@Grayhill.com wrote:
> >
> > My wdk is version 7600.16385.1 and runing on a Windows XP . In the
> > directory bin\selfsign directory, there is only inf2cat tool. There
> > are all other tools in the directory bin\amd64 and bin\ia64
> > directories. When I tried run the Makecert in a build environment
> > command windows, I got a " Makecert is not a valid win32 application
> > error massage". Did I do something wrong?
>
> You always need to use the x86 version of the tools on a 32-bit system.
>
> However, you cannot use a self-generated certificate for the KMCS
> signature on 64-bit systems unless you turn off the driver signing check
> at boot time. If you’re going to do driver development, then you need
> to invest in a real Class 3 Code-Signing Certificate from one of the
> approved vendors.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.

>According the documents, I can do the driver test without an official signing.

There are 2 kinds of the driver signing, don’t you know?

system? Also I am using a Windows XP as develop systemto develop a Windows 7 64 bit driver.
Does it cause any problem to do the develop, testing or self signing?

No.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Thanks you very much Tim and Pavel.

Bob