Link to home
Start Free TrialLog in
Avatar of Ecompro

asked on

Windows 7 (x64) - Modifying Printer .INF files

For years if we needed to install a printer that has a slightly different naming convention for different versions of Windows, we could modify .ini files in c:\windows\inf.  Here's a specific example.

Windows XP and Server 2003 uses the name "HP Laserjet 4200 PCL 6" and that's the driver on our Server 2003 domain print server.  In Windows 7 the naming convention is "HP Laserjet 4200/4300 PCL6".

In the good old days pre-Vista/7, we could modify the .inf file's entry.  In Windows 7 and Server 2008, the file holding this entry is c:\windows\inf\prnhp002.inf.  The specific entry is:

"HP LaserJet 4200/4300 PCL6"           = hpmcpap6.gpd.Win7,Hewlett-PackardHP_La4AE5,Hewlett-PackardHP_La8AB4,HP_LaserJet_4200/4300_PCL6 ; Hardware ID

Open in new window

Now when I modify that line to read as we need it...
"HP LaserJet 4200 PCL 6"           = hpmcpap6.gpd.Win7,Hewlett-PackardHP_La4AE5,Hewlett-PackardHP_La8AB4,HP_LaserJet_4200/4300_PCL6 ; Hardware ID

Open in new window

.... so the PC's driver name matches the driver name on the print server (allowing us to map that printer on the PC) for some reason Windows 7 "Add a Printer" wizard (where you select the make and model of the printer to add) is still showing the OLD name "HP LaserJet 4200/4300 PCL6", even AFTER the .inf file is changed and the print spooler service is restarted.

What is the trick these days?  We can't change the print server, so the naming change has to be made on the client PC.  But our changes to the INF files are NOT being reflected in the list of available print drivers in the Add/Remove printers applet.

Advice, please?
Avatar of Netman66
Flag of Canada image

Read across the entire line:

Hardware ID
"HP LaserJet 4200/4300 PCL6"           = hpmcpap6.gpd.Win7,Hewlett-PackardHP_La4AE5,Hewlett-PackardHP_La8AB4,HP_LaserJet_4200/4300_PCL6 ;

It appears twice and should be modified twice.  

When you're done modding it, delete the .PNF file right below the INF in the same folder.

Try again to see if it is correct.
Avatar of Ecompro


No joy.  Modified the hpprn02.inf file (in both places), deleted the PNF file, restarted spooler and it still shows "4200/4300 PCL6" instead of "4200 PCL 6".

So I rebooted thinking maybe the PNF file would be recreated-- but it was not-- hpprn02.pnf was NOT recreated.

Add Printer wizard still shows the old pre-change naming convention.  So apparently the wizard is pulling this information from some other location besides the prnhp02.inf file (the prnhp02.pnf file does not exist)

Or check to see if there are any OEM*.inf and .pnf files that contain a copy of the original .inf.
You are getting the built-in driver for the 4200/4300 which is in PRNHP002.INF.  Edit that INF, delete the PNF, and try it.
Avatar of Ecompro


DavisMcCarn, you apparently have not read any of my posts.  I *specifically* discussed the prnhp002.inf file in EVERY post I've made on this topic.
I'm sorry; I did read; but missed that as I was in a hurry.
But; I think I found where to look:
Vista/7/2008 build a cache of the drivers in two places and will try to use them first.
One is a set of .DAT file built in the INF folder.  Here is a how-to on rebuilding them:
The other is a set of folders in the DriverCache folder:
Avatar of Ecompro

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ecompro


Might be a problem that cannot be solved in the way I was hoping.  Requesting  this question be closed, with thanks to those who made the effort.