DPInst driver installation problem

Hi all,

I have a suite of WDM drivers that I’d like to install using an .msi file, and am looking into using DPInst so that I could eventually use DPFxApp to create the necessary MSI file (if there is a better way to package a bunch of virtual/filter/export drivers into an .msi file please let me know!). The problem is, I cannot for the life of me get DPInst to recognize even a single one of my drivers. I looked at the previous discussions on this topic (specifically this one: http://www.osronline.com/showThread.cfm?link=141800) but didn’t get anywhere. My googling resulted in nothing as well. So, as a last resort, I came here :slight_smile:

I’m testing the installer on Windows XP SP 3 (I’ve also tested in Windows 7). The driver I’m trying to install is an export driver. My directory (C:\test) contains dpinst.exe, dpinst.xml, hashmap.inf, hashmap.sys. The driver is unsigned.

dpinst.xml is as follows:

<?xml version="1.0" ?>






Device Driver Updater
Welcome to the Device Installer!
This wizard will walk you through…
Installing software!
Done!



hashmap.inf is as follows:

[Version]
Signature = “$Windows NT$”
Class = MyClass
ClassGUID = {821907d4-08e5-4421-ba9b-aa88cf8fb313}
Provider = %Provider%
; CatalogFile = hashmap.cat ; It’s unsigned!
DriverVer = 03/14/2011,1.0.0.0
DriverPackageType = KernelModule
DriverPackageDisplayName = %Description%

[SourceDisksFiles]
hashmap.sys = 1

[SourceDisksNames]
1 = %DiskInst%,

[DefaultInstall]
CopyFiles = hashmap.DriverFiles

[DefaultUninstall]
DelFiles = hashmap.DriverFiles

[DestinationDirs]
DefaultDestDir = 12

[hashmap.DriverFiles]
hashmap.sys

[Strings]
Provider = “My Company”
DiskInst = “Hashmap Export Driver Installation Disk”
Description = “Hashmap Export Driver”

ChkInf gives the following errors/warnings, all of which I believe are OK:

Errors:

Line 1: (E22.1.1081) Directive: CatalogFile required (and must not be blank) in section [Version] for WHQL digital signature.
Warnings:

Line 0: (W22.1.2212) No Copyright information found.
Line 3: (W22.1.2215) Class MyClass (ClassGUID {821907d4-08e5-4421-ba9b-aa88cf8fb313}) is unrecognized.
Line 3: (W22.1.2203) Custom defined Classes should have a [ClassInstall32] section.
Line 8: (W22.1.2202) Unrecognized directive: DriverPackageType
Line 9: (W22.1.2202) Unrecognized directive: DriverPackageDisplayName

And the error I get upon running “C:\test\dpinst.exe /lm /c /q” is:

INFO: Current working directory: ‘C:\test’
INFO: Running on path ‘C:\test’
INFO: User UI Language is 0x409.
INFO: Install option set: legacy mode on.
INFO: Install option set: Suppress pre-install of Plug and Play drivers if no matching devices are present.
INFO: Install option set: Suppress Add or Remove Programs entries.
INFO: Found driver package: ‘C:\test\hashmap.inf’.
INFO: Preinstalling ‘c:\test\hashmap.inf’ …
INFO: ENTER: DriverPackagePreinstallW
ERROR: Preinstall is not a supported operation for driver type 10
INFO: RETURN: DriverPackagePreinstallW (0x1)
INFO: ENTER: DriverPackageGetPathW
INFO: No driver store entry for c:\test\hashmap.inf found. (Error code 0xE0000302.)
INFO: RETURN: DriverPackageGetPathW (0xE0000302)
INFO: ENTER: DriverPackageInstallW
INFO: RETURN: DriverPackageInstallW (0x1)
INFO: Returning with code 0x80010000

Doing the normal right-click->install of hashmap.inf installs the driver successfully.

Any help would be greatly appreciated.

  • AM

xxxxx@gmail.com wrote:

I have a suite of WDM drivers that I’d like to install using an .msi file, and am looking into using DPInst so that I could eventually use DPFxApp to create the necessary MSI file (if there is a better way to package a bunch of virtual/filter/export drivers into an .msi file please let me know!). The problem is, I cannot for the life of me get DPInst to recognize even a single one of my drivers. I looked at the previous discussions on this topic (specifically this one: http://www.osronline.com/showThread.cfm?link=141800) but didn’t get anywhere. My googling resulted in nothing as well. So, as a last resort, I came here :slight_smile:

This is a legacy driver – not PnP. DPInst and “pre-installation”
applies only to PnP drivers.

You don’t even need DifxApp for this. Just copy the file into place.
That’s all you need to do.


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

What do you mean by “just copy the file into place”? I understand that installing this one driver is easy by just copying it to %windir%\system32\drivers, but if I’ve got a whole slew of export/filter/virtual drivers that I’d like to install from an .msi file, is DPInst not the ideal approach? From what I could gather, DPInst supports installing other types of drivers, not just PnP. It also makes it easy to install drivers in a specific order, which is something I need. I’m also unsure how else to package this all into an msi file; DifxApp seemed like the easiest approach.

xxxxx@gmail.com wrote:

What do you mean by “just copy the file into place”? I understand that installing this one driver is easy by just copying it to %windir%\system32\drivers, but if I’ve got a whole slew of export/filter/virtual drivers that I’d like to install from an .msi file, is DPInst not the ideal approach?

Not particularly, no. DPInst does a “pre-installation”. It copies the
files from your package into the driver store, which is one of the
places Device Manager looks when it goes searching for a PnP hardware
identifier. If none of your drivers are loaded by matching a hardware
identifier, then the driver store is useless for you, as is DPInst.

Export drivers are installed by copying them to system32\drivers.
Filter drivers are installed by copying them to system32\drivers,
creating a Services entry using the Service Manager APIs, and adding a
registry entry into the class or device to be filtered. For virtual
drivers, it depends on how they’re loaded. What kinds of drivers are
you filtering?

From what I could gather, DPInst supports installing other types of drivers, not just PnP.

I don’t think that’s true. They don’t have to have hardware, but they
have to be PnP.

It also makes it easy to install drivers in a specific order, which is something I need.

How do you think it supports that? The order of installation should not
be important – presumably it is the order of LOADING that matters to
you. How will your drivers be loaded? That’s really a fundamental
question here. What triggers the loading?


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

OK, it’s all becoming clearer now.

So I guess the best approach would be using a standard MSI creator (I’m looking at WiX now) to copy in all the necessary files, and write a batch script to handle the loading?

Driver installation / MSIs are new to me (I was using the copy/sc.exe method for testing), so thanks for your help/clarification.

  • AM

xxxxx@gmail.com wrote:

OK, it’s all becoming clearer now.

So I guess the best approach would be using a standard MSI creator (I’m looking at WiX now) to copy in all the necessary files, and write a batch script to handle the loading?

Driver installation / MSIs are new to me (I was using the copy/sc.exe method for testing), so thanks for your help/clarification.

Exactly. The copy-and-sc method is perfectly adequate. If a batch file
makes you uncomfortable, then a simple installer app with equivalent
CopyFile and CreateService calls will do the same job.


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