Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover the INF file from an installed XP printer driver?

Tags:

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?

like image 984
Barry Burns Avatar asked Sep 25 '09 17:09

Barry Burns


1 Answers

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.

like image 91
Dale Avatar answered Oct 15 '22 19:10

Dale