Driver Installation headaches.

Hi all,

I’m hoping you can assist me with this. I have an unsigned filter driver which has been in development for some time and I am working to include in my InstallShield 2009 installer. The IS installer uses Difx to install drivers.

I am using the WDK 6000.

I have been using an .inf to install and do my testing, but that .inf is causing all kinds of havoc when trying to use Difx. When I right-click the inf and hit install, the driver is installed and I’m able to load it using the filter manager.

Does anyone know what system application/api gets called when you right click on an .inf and select ‘install’ ?

In my test environment, I have moved the dpinst.exe onto the test environment, and I have begun to use the command line and try to figure out what’s going on.

Here’s the command I’m running:
dpinst /lm /c /a /path c:\

and Here’s the output I’m currently getting from it:

INFO: Option set: dumping log info to console.
INFO: Current working directory: 'C:'
INFO: Running on path 'c:'
INFO: No valid ‘dpinst.xml’ file provided.
INFO: Install option set: Running in quiet mode. Suppressing Wizard and OS popups.
INFO: Install option set: legacy mode on.
INFO: Found driver package: ‘c:\OsrDmk.inf’.
INFO: Preinstalling ‘c:\osrdmk.inf’ …
INFO: ENTER: DriverPackagePreinstallW
ERROR: Preinstall is not a supported operation for driver type 5
INFO: RETURN: DriverPackagePreinstallW (0x1)
INFO: ENTER: DriverPackageGetPathW
INFO: No driver store entry for c:\osrdmk.inf found. (Error code 0xE0000302.)
INFO: RETURN: DriverPackageGetPathW (0xE0000302)
INFO: ENTER: DriverPackageInstallW
INFO: Copied ‘osrdmk.inf’ to driver store…
INFO: Commiting queue…
WARNING:Skipping copy of file OsrDmk.sys. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file Osrdmk.inf. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDsManager.sys. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDt.sys. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
ERROR: Could not get services associated with driver package.
ERROR: The driver installation failed. Attempting to undo system changes … (Error code 0x65B: Function failed during execution.)
INFO: Driver Store entry removed.
INFO: RETURN: DriverPackageInstallW (0x65B)
INFO: Returning with code 0x80010000

The 302 error returned is “ERROR_DRIVER_PACKAGE_NOT_IN_STORE”.

This really has me stumped, and I’m unsure where to progress from here. Any assistance is greatly appreciated.

Thanks in advance,
D

What is your DriverPackageType in the inf file?

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@rationalretention.com
Sent: Tuesday, October 28, 2008 3:50 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Driver Installation headaches.

Hi all,

I’m hoping you can assist me with this. I have an unsigned filter driver
which has been in development for some time and I am working to include in
my InstallShield 2009 installer. The IS installer uses Difx to install
drivers.

I am using the WDK 6000.

I have been using an .inf to install and do my testing, but that .inf is
causing all kinds of havoc when trying to use Difx. When I right-click the
inf and hit install, the driver is installed and I’m able to load it using
the filter manager.

Does anyone know what system application/api gets called when you right
click on an .inf and select ‘install’ ?

In my test environment, I have moved the dpinst.exe onto the test
environment, and I have begun to use the command line and try to figure out
what’s going on.

Here’s the command I’m running:
dpinst /lm /c /a /path c:\

and Here’s the output I’m currently getting from it:

INFO: Option set: dumping log info to console.
INFO: Current working directory: 'C:'
INFO: Running on path 'c:'
INFO: No valid ‘dpinst.xml’ file provided.
INFO: Install option set: Running in quiet mode. Suppressing Wizard and OS
popups.
INFO: Install option set: legacy mode on.
INFO: Found driver package: ‘c:\OsrDmk.inf’.
INFO: Preinstalling ‘c:\osrdmk.inf’ …
INFO: ENTER: DriverPackagePreinstallW
ERROR: Preinstall is not a supported operation for driver type 5
INFO: RETURN: DriverPackagePreinstallW (0x1)
INFO: ENTER: DriverPackageGetPathW
INFO: No driver store entry for c:\osrdmk.inf found. (Error code
0xE0000302.)
INFO: RETURN: DriverPackageGetPathW (0xE0000302)
INFO: ENTER: DriverPackageInstallW
INFO: Copied ‘osrdmk.inf’ to driver store…
INFO: Commiting queue…
WARNING:Skipping copy of file OsrDmk.sys. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file Osrdmk.inf. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDsManager.sys. File is referenced in
osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDt.sys. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
ERROR: Could not get services associated with driver package.
ERROR: The driver installation failed. Attempting to undo system changes
… (Error code 0x65B: Function failed during execution.)
INFO: Driver Store entry removed.
INFO: RETURN: DriverPackageInstallW (0x65B)
INFO: Returning with code 0x80010000

The 302 error returned is “ERROR_DRIVER_PACKAGE_NOT_IN_STORE”.

This really has me stumped, and I’m unsure where to progress from here. Any
assistance is greatly appreciated.

Thanks in advance,
D


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

Here’s the version section.

[Version]
Signature = “$Windows NT$”
DriverPackageType = ClassFilter
Class = “ContentScreener” ;This is determined by the work this filter driver does
Provider = %OSR%
DriverVer = 17/11/2006,1.0.0.0

That is similar to mine except that I have a ClassGuid also.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@rationalretention.com
Sent: Tuesday, October 28, 2008 4:18 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver Installation headaches.

Here’s the version section.

[Version]
Signature = “$Windows NT$”
DriverPackageType = ClassFilter
Class = “ContentScreener” ;This is determined by the work
this filter driver does
Provider = %OSR%
DriverVer = 17/11/2006,1.0.0.0


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

What does the rest of your inf look like? What about these warnings?

WARNING:Skipping copy of file OsrDmk.sys. File is referenced in osrdmk.inf but
not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file Osrdmk.inf. File is referenced in osrdmk.inf but
not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDsManager.sys. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDt.sys. File is referenced in osrdmk.inf but
not listed in section [SourceDisksFiles].

Also, you might want to take a look in \windows\setupapi.log and post the part
that covers your installation.

Good luck,

mm

xxxxx@rationalretention.com wrote:

Here’s the version section.

[Version]
Signature = “$Windows NT$”
DriverPackageType = ClassFilter
Class = “ContentScreener” ;This is determined by the work this filter driver does
Provider = %OSR%
DriverVer = 17/11/2006,1.0.0.0

Since my driver is unsigned, and the driver doesn’t have a guid header file, wouldn’t a guid cause issues?

If not, should I simply use the guidgen.exe and stick any old one in there?

What does that have to so with it? The class guid refers to the class name
that was specified in the inf file. They are a pair that defines the class.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@rationalretention.com
Sent: Tuesday, October 28, 2008 4:31 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver Installation headaches.

Since my driver is unsigned, and the driver doesn’t have a guid header file,
wouldn’t a guid cause issues?

If not, should I simply use the guidgen.exe and stick any old one in there?


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

Oh. Ok. now that I’m looking at the msdn description I see what you mean. I’m adding it now and seeing what effect it has on the install.

xxxxx@rationalretention.com wrote:

Here’s the version section.

[Version]
Signature = “$Windows NT$”
DriverPackageType = ClassFilter
Class = “ContentScreener” ;This is determined by the work this filter driver does
Provider = %OSR%
DriverVer = 17/11/2006,1.0.0.0

DriverVer is defined as being mm/dd/yyyy. That’s not causing your
trouble, because it’s mostly just a comment, but it’s something to
remember for the future.


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

I think that you should include the part of the previous message that you
are replying to. I know what you are replying to but anyone else reading
this woun’t have a clue to what you are refering to.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@rationalretention.com
Sent: Tuesday, October 28, 2008 4:39 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver Installation headaches.

Oh. Ok. now that I’m looking at the msdn description I see what you mean.
I’m adding it now and seeing what effect it has on the install.


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

Sorry. I’m actually using the forum and posting in there, and not emailing on the list. Sorry about that.

---- Original Message ---------

I think that you should include the part of the previous message that you are replying to. I know what you are replying to but anyone else reading this woun’t have a clue to what you are refering to. Bill Wandel

-----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rationalretention.com Sent: Tuesday, October 28, 2008 4:39 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Driver Installation headaches. Oh. Ok. now that I’m looking at the msdn description I see what you mean. I’m adding it now and seeing what effect it has on the install. — 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

Interesting. I cannot find the ClassFilter GUID… I’m sure it’s around here somewhere.

------- Original Message ---------
What does that have to so with it? The class guid refers to the class name that was specified in the inf file. They are a pair that defines the class. Bill Wandel -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rationalretention.com Sent: Tuesday, October 28, 2008 4:31 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Driver Installation headaches. Since my driver is unsigned, and the driver doesn’t have a guid header file, wouldn’t a guid cause issues? If not, should I simply use the guidgen.exe and stick any old one in there? —

You define the class guid with one of the guid gen tools. This goes with the
class name that you defined.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@rationalretention.com
Sent: Tuesday, October 28, 2008 4:55 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver Installation headaches.

Interesting. I cannot find the ClassFilter GUID… I’m sure it’s around
here somewhere.

------- Original Message ---------
What does that have to so with it? The class guid refers to the class name
that was specified in the inf file. They are a pair that defines the class.
Bill Wandel -----Original Message----- From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rationalretention.com Sent:
Tuesday, October 28, 2008 4:31 PM To: Windows System Software Devs Interest
List Subject: RE:[ntdev] Driver Installation headaches. Since my driver is
unsigned, and the driver doesn’t have a guid header file, wouldn’t a guid
cause issues? If not, should I simply use the guidgen.exe and stick any old
one in there? —


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

Yup. I realize that now. in creating a new guid and adding that option to the version area, I still get the same error:

INFO: Found driver package: ‘c:\OsrDmk.inf’.
INFO: Preinstalling ‘c:\osrdmk.inf’ …
INFO: ENTER: DriverPackagePreinstallW
ERROR: Preinstall is not a supported operation for driver type 5
INFO: RETURN: DriverPackagePreinstallW (0x1)
INFO: ENTER: DriverPackageGetPathW
INFO: No driver store entry for c:\osrdmk.inf found. (Error code 0xE0000302.)
INFO: RETURN: DriverPackageGetPathW (0xE0000302)
INFO: ENTER: DriverPackageInstallW
INFO: Copied ‘osrdmk.inf’ to driver store…
INFO: Commiting queue…
WARNING:Skipping copy of file OsrDmk.sys. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file Osrdmk.inf. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDsManager.sys. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDt.sys. File is referenced in osrdmk.inf but not listed in section [SourceDisksFiles].
ERROR: Could not get services associated with driver package.
ERROR: The driver installation failed. Attempting to undo system changes … (Error code 0x65B: Function failed during execution.)
INFO: Driver Store entry removed.
INFO: RETURN: DriverPackageInstallW (0x65B)
INFO: Returning with code 0x80010000

So, I’m still back to square one… It seems like the installer just doesn’t wnat to add it to the driver store, and from that point it doesn’t matter what comes after it…

Strange how this will work when you right click -> install. I wonder what windows funkiness is being called there…

— Original Message ----
You define the class guid with one of the guid gen tools. This goes with the class name that you defined. Bill Wandel
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@rationalretention.com Sent: Tuesday, October 28, 2008 4:55 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Driver Installation headaches.

Interesting. I cannot find the ClassFilter GUID… I’m sure it’s around here somewhere.
------- Original Message ---------

xxxxx@rationalretention.com wrote:

Yup. I realize that now. in creating a new guid and adding that option to the version area, I still get the same error:

So, I’m still back to square one… It seems like the installer just doesn’t wnat to add it to the driver store, and from that point it doesn’t matter what comes after it…

Strange how this will work when you right click -> install. I wonder what windows funkiness is being called there…

It’s no mystery. That is equivalent to:

rundll32 setupapi,InstallHinfSection DefaultInstall 132 xxxxx.inf

All it does is call the InstallHinfSection API to process the single
section called [DefaultInstall]. On the other hand, the preinstallation
scans through the entire INF trying to locate all of the files that
might possibly be needed by any installation involving this INF file.

The error message seems abundantly clear. The [CopyFiles] sections of
your INF file are referring to OsrDmk.inf, OsrDmk.sys, OsrDsManager.sys,
and OsrDt.sys, but they aren’t listed in any [SourceDisksFiles]. If
those files are NOT needed by your class filter, then you should remove
them from the INF. If they ARE needed, then you are required to list
them in [SourceDisksFiles].


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

Next is the SourceDiskFiles problem.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@rationalretention.com
Sent: Tuesday, October 28, 2008 5:09 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver Installation headaches.

Yup. I realize that now. in creating a new guid and adding that option to
the version area, I still get the same error:

INFO: Found driver package: ‘c:\OsrDmk.inf’.
INFO: Preinstalling ‘c:\osrdmk.inf’ …
INFO: ENTER: DriverPackagePreinstallW
ERROR: Preinstall is not a supported operation for driver type 5
INFO: RETURN: DriverPackagePreinstallW (0x1)
INFO: ENTER: DriverPackageGetPathW
INFO: No driver store entry for c:\osrdmk.inf found. (Error code
0xE0000302.)
INFO: RETURN: DriverPackageGetPathW (0xE0000302)
INFO: ENTER: DriverPackageInstallW
INFO: Copied ‘osrdmk.inf’ to driver store…
INFO: Commiting queue…
WARNING:Skipping copy of file OsrDmk.sys. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file Osrdmk.inf. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDsManager.sys. File is referenced in
osrdmk.inf but not listed in section [SourceDisksFiles].
WARNING:Skipping copy of file OsrDt.sys. File is referenced in osrdmk.inf
but not listed in section [SourceDisksFiles].
ERROR: Could not get services associated with driver package.
ERROR: The driver installation failed. Attempting to undo system changes
… (Error code 0x65B: Function failed during execution.)
INFO: Driver Store entry removed.
INFO: RETURN: DriverPackageInstallW (0x65B)
INFO: Returning with code 0x80010000

So, I’m still back to square one… It seems like the installer just
doesn’t wnat to add it to the driver store, and from that point it doesn’t
matter what comes after it…

Strange how this will work when you right click -> install. I wonder what
windows funkiness is being called there…

— Original Message ----
You define the class guid with one of the guid gen tools. This goes with the
class name that you defined. Bill Wandel -----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@rationalretention.com Sent: Tuesday, October 28, 2008 4:55 PM To:
Windows System Software Devs Interest List Subject: RE:[ntdev] Driver
Installation headaches.

Interesting. I cannot find the ClassFilter GUID… I’m sure it’s around
here somewhere.
------- Original Message ---------


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

> Since my driver is unsigned, and the driver doesn’t have a guid header file, wouldn’t a guid cause

issues?

If you have invented a setup class name, then please also invent a GUID for it.


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

> DriverVer is defined as being mm/dd/yyyy.

I think that xx/yy/zzzz is always the American mm/dd/yyyy

To use European dd.mm.yyyy, people usually write dots and not slashes.


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

Ok,

Thanks for the assistance thus far, gents. Inf’s are new to me and I appreciate the help greatly. I have fixed the sourcedisksissue. I also added a new guid for the class type.

I also modified the version date to match NA standards. I am currently NOT using a cat file because my driver and its files are currently not signed.

I’m now getting the following error:

"Could Not Get Services associated with the driver package.
---- original message ----
Next is the SourceDiskFiles problem. Bill Wandel

– Original Message ----

Since my driver is unsigned, and the driver doesn’t have a guid header file, wouldn’t a guid cause >issues? If you have invented a setup class name, then please also invent a GUID for it.

– Original Message —

DriverVer is defined as being mm/dd/yyyy. I think that xx/yy/zzzz is always the American mm/dd/yyyy To use European dd.mm.yyyy, people usually write dots and not slashes.

Sorry, I accidently hit submit before I was done typing. That error is combined with the DriverPackageInstallW error code of 0x65B. I haven’t been able to hunt down what that code means yet… I’m doing that now.

My inf is setup as follows for the services section:
[DefaultInstall.Services]
AddService = OsrDmk,OsrDmk.Service
AddService = OsrDs,OsrDs.Service
AddService = OsrDt,OsrDt.Service

[OsrDmk.Service]
DisplayName = “OSR Data Manipulation Kit - core services”
Description = “Osr Dmk - Core”
ServiceBinary = %12%\OsrDmk.sys ;%windir%\system32\drivers\OsrDmk.sys
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = “FSFilter Compression”
AddReg = OsrDmk.AddRegistry
Dependencies = FltMgr

[OsrDs.Service]
DisplayName = “DSmanager”
Description = “OSR DS SERVICE”
ServiceBinary = %12%\OsrDsManager.sys
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = “FSFilter Compression”
AddReg = OsrDs.AddRegistry

[OsrDt.Service]
DisplayName = “OSR Data Manipulation Kit - Dt services”
Description = “Osr Dmk - Dt”
ServiceBinary = %12%\OsrDt.sys ;%windir%\system32\drivers\OsrDt.sys
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = “FSFilter Compression”
AddReg = OsrDt.AddRegistry
Dependencies = FltMgr

Keeping in mind this supposedly installs when running the simple default install section, I’m not quite sure what’s going on here. Any more insight is greatly appreciated.

Best,
D

– Original message —
Ok, Thanks for the assistance thus far, gents. Inf’s are new to me and I appreciate the help greatly. I have fixed the sourcedisksissue. I also added a new guid for the class type. I also modified the version date to match NA standards. I am currently NOT using a cat file because my driver and its files are currently not signed. I’m now getting the following error: "Could Not Get Services associated with the driver package.

---- original message ----
Next is the SourceDiskFiles problem. Bill Wandel

– Original Message ----
> Since my driver is unsigned, and the driver doesn’t have a guid header file, wouldn’t a guid cause >issues? If you have invented a setup class name, then please also invent a GUID for it. – Original Message — > DriverVer is defined as being mm/dd/yyyy. I think that xx/yy/zzzz is always the American mm/dd/yyyy To use European dd.mm.yyyy, people usually write dots and not slashes.