Launch WDF driver in Windows XP

@“Peter_Viscarola_(OSR)” said:
Use devcon like:

Devcon install

So:

devcon.exe install procmon.inf root\procmon

Run this from the directory in which you have copied the INF, co-installer, and sys file… as I said before. Make sure the INF is correct, and that the paths all are correct.

This isn’t rocket science. Spend some time debugging the problem. We’re trying to help, but we can do your work for you.

Peter

I think, a found mistake, can you please check it…

https://pastebin.com/426056wL
This is setup log, and there he copy files to “C:\WINDOWS\system32” dir, but then, later, he tried to add service using another path: “C:\WINDOWS\system32\DRIVERS”.

And in .inf file it is setted here:


; -------------- procmon driver install sections
[procmon_Service_Inst]
DisplayName = %procmon.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\procmon.sys

;
;— procmon_Device Coinstaller installation ------
;

[DestinationDirs]
DefaultDestDir = 11
procmon_Device_CoInstaller_CopyFiles = 11


So, in section “procmon_Service_Inst” setting “ServiceBinary” must be: %11%\procmon.sys.
That is?

Yea, i check, now it work.

But can you please explain, why this invalid config was accepted and work on Win7/10?

Actually, buridan’s suggestion is wrong. %12% is \windows\system32\drivers. %11% is \windows\system32. So, the RIGHT answer is to change [DestinationDirs] procmon_Device_Coinstaller_CopyFiles to 12, not 11, and leave the ServiceBinary as %12%. Drivers belong in %12%.

@Tim_Roberts said:
Actually, buridan’s suggestion is wrong. %12% is \windows\system32\drivers. %11% is \windows\system32. So, the RIGHT answer is to change [DestinationDirs] procmon_Device_Coinstaller_CopyFiles to 12, not 11, and leave the ServiceBinary as %12%. Drivers belong in %12%.

It’s like unspoken rule, that drivers must be in %12%, so, for what uses %11% regarding the .inf driver files?

Kernel modules go into %12%. Many driver packages also have to install user-mode co-installers, DLLs, or other support files into %11%.

Plus, going back in history, the 16-bit systems (Win95, WIn98, WinME) didn’t understand the %12% mapping. One had to use %11%\Drivers for cross-platform driver packages.

1 Like

INFs can be used outside of driver installs. They existed well before the driver install engine started using them. %11% was a valid target back in the Win9x days before we knew any better.

Ah, good old DirID 11. I mean, who wouldn’t immediately understand what THAT is?!?

The whole idea of DirIDs is really funny these days. You know, they start at 01 and they’re a sparse namespace though 32767… and there’s a “-1” that’s a “special secret reserved” dirID (it’s not REALLY secret… it just means “this is a literal path” – The whole topic of DirIDs always makes me laugh, it’s so ancient and historic, yet we live with it today.

Peter

If we started over with current best practices, INFs would look and behave quite differently :slight_smile: