views:

961

answers:

1

I am trying to build a utility to export an installed printer driver from a Windows machine. All is well and good on Vista and higher, because the InfPath entry in the driver's registry key points at the INF file. However, on previous versions of Windows, this doesn't exist.

Sometimes I can find the INF file for a printer by scanning C:\Windows\Inf, but this is generally only true of drivers that are part of Windows.

What is done with the INF file after a printer driver is installed? Is it even saved? Is it realistic to reconstruct it programmatically?

+4  A: 

It isn't saved, the INF is just used to install the driver and to give it a meaningful name "My device driver" in the registry. There is no way to reconstruct it, but if the driver is simple enough, you may be able to rewrite an INF that will allow it to install, there is plenty of information about the format of INF files on google. I have done this before for devices that have different manufacturers but share the same chipset by changing the device ID string in the INF file.

The INF files that are in C:\Windows\Inf are just for installing the set of drivers that ship with Windows.

Dale Halliwell