Jump to content

Recommended Posts

Posted

So this has been an ongoing problem for quite a while now.

 

The first instance was a member of staff who wasn't able to print to his usual printer. It had always worked before as usual. When he printed, the document didn't even leave the computer (no white box in the system tray saying it had sent) although it appeared to work as normal from the document. The same with test pages. Other printers worked for him and other people could print to this printer as usual.

 

All the printers are networked and mapped via script.

 

Eventually I changed the driver for the printer (all HP printers - can't remember now but something on the universal driver 5 to 5.0.5 or similar) and the problem was resolved.

 

But this keeps happening randomly around the school. Currently there are about 3 computers out of a group of 10, identically built machines which are having this problem, but the other 7 are fine. I don't particularly want to have to change the driver each time as there is no reason it shouldn't work - it always has done in the past. Plus the last time I had to do this it solved the problem for one machine, but created it on another.

 

Has anyone seen this before and has any idea of a solution?

Posted

Is the printer hosted on a server and the script adds their shared path? If so, in printer properties, is the printer set to spool rather than print directly to device? I'd make sure it's spooling via the server using that setting first.

 

Also, I'd consider adding the printers via GPO (obviously depends on your setup), but I at one time at some randomly unreliable printer connections resolved by moving away from the script and to the add printer function in GPO (this was 2008 server). Maybe not specific to your issue, but I find it does help a lot of issues.

Posted

I've been seeing similar issues with printer drivers taking a dump on client machines. Our setup consists of mostly HP printers, a 2008 x32 printer server, Windows 7 x64 clients and printers are mapped via script. When the problem occurs users report issues with portrait/landscape settings, multipage print jobs printing onto a single page, and the inability to add new printers to the system (ones that share the same driver as the afflicted printers).

 

The quick solution for me is to stop the print spool service, delete the driver entries from the registry, restart the service, and add the printers back. This fixes it every time. The issue seems to be very random and sometime gives issue with Toshiba copier drivers (doesn't seem to be isolated to HP drivers).

 

If you try and delete the driver from the local machine using the print management snap-in then odds are it'll say the driver is in use even if all the printers have been removed. Sometimes a restart clears this, and sometime it doesn't. Removing the keys from the registry always works without a reboot.

 

HKLM\System\CurrentControlSet\Control\Print\Environments\(flavor of client windows goes here)\Drivers\Version-3\(Driver Name)

 

I'm still at a complete loss for what causes this though. The only thing I can think of is the script attempts to add the printer on every logon even if it already exists. This initiates copying the driver over again and sometime the process is interrupted resulting in a corrupted driver install. Just a theory...

  • Thanks 1
Posted

I've been having similar problems where random computers would stop printing to any HP printer. I've tried restarting the print spooler several times only for it to work for a day and then it stops printing again.

 

When this first started to happen, I would re-image the machine every time the computer would stop printing. After some testing, I took a machine off the domain, installed the upd-pcl6-x64-5.8.0.17508 driver, put machines back on the domain again and it started to print again.

 

Matt

  • 3 weeks later...
Posted (edited)
I've been seeing similar issues with printer drivers taking a dump on client machines. Our setup consists of mostly HP printers, a 2008 x32 printer server, Windows 7 x64 clients and printers are mapped via script. When the problem occurs users report issues with portrait/landscape settings, multipage print jobs printing onto a single page, and the inability to add new printers to the system (ones that share the same driver as the afflicted printers).

 

The quick solution for me is to stop the print spool service, delete the driver entries from the registry, restart the service, and add the printers back. This fixes it every time. The issue seems to be very random and sometime gives issue with Toshiba copier drivers (doesn't seem to be isolated to HP drivers).

 

 

If you try and delete the driver from the local machine using the print management snap-in then odds are it'll say the driver is in use even if all the printers have been removed. Sometimes a restart clears this, and sometime it doesn't. Removing the keys from the registry always works without a reboot.

 

HKLM\System\CurrentControlSet\Control\Print\Environments\(flavor of client windows goes here)\Drivers\Version-3\(Driver Name)

 

I'm still at a complete loss for what causes this though. The only thing I can think of is the script attempts to add the printer on every logon even if it already exists. This initiates copying the driver over again and sometime the process is interrupted resulting in a corrupted driver install. Just a theory...

Just had the problem again with another computer (which has done it before). Tried this but it hasn't worked sadly. It's getting really frustrating!

*edit* ignore this - different issue!

Edited by Novalee
Posted

Here is a lengthy Tech Net thread about the issue: https://social.technet.microsoft.com/Forums/en-US/e2acb625-027d-47a9-b4a7-1616e270bcbc/print-drivers-on-windows-7-clients-missing-dependent-files

 

I've personally seen this issue on my network affect drivers ranging from PCL5, PCL6 to HP and Toshiba; I don't think it is a specific driver issue. People have reported the same problems with the print server being hosted on 2008, 2008R2, and 2012R2, so this seem to indicate the problem is with the client.

 

The exact cause of the driver of becoming unstable is the blanking of a registry value located in:

HKLM\System\CurrentControlSet\Control\Print\Environments\(flavor of client windows goes here)\Drivers\Version-3\(Driver Name)

 

The Dependent Files multiline string value is blanked and then depending on the driver all sorts of goofy crap starts to happen: multipage print jobs printing all on a single page, landscape/portrait not working, and XML errors on HP Laserjets are just to name a few. Turning on registry auditing show that it is in fact the print spooler service on the client making the change. While there are mentions to hotfixes they don't seem to do much.

 

I'm thinking I'm just going to add a sub to my logon script to check for blank values in that key and fill in as necessary for the most common drivers.

 

What a pain this is...

Posted

Alright, here is my script to fix this mess. This contains the most common printer drivers used on my network and has worked in a testing environment. A few things to note though:

 

  1. The required files listed for each driver can vary with the driver version. You should alter these arrays based on the driver versions in use on your print server even if you have the same model printers in use.
  2. To restart the print spooler at the end the script needs to be ran with local administrator rights. If you plan on using it as a logon script the user needs local admin. You may be able to get away with using it as a startup script which would make it run as the local machine, but I have not tested this.
  3. I have not placed this into production yet, but even if I had you should still test this before using it out in the wild.

 

I hope this helps someone out there.

 

'https://social.technet.microsoft.com/Forums/scriptcenter/en-US/ee7ba165-47cd-4322-b312-8569341d0b3e/vb-script-to-stop-print-spooler?forum=ITCG

Dim strCompName
Const HKEY_LOCAL_MACHINE = &H80000002
strCompName = "."

strKeyBasePath = "SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers\Version-3"
strValueName = "Dependent Files"

strHP1200PCL5 = "HP LaserJet 1200 Series PCL 5"
arrHP1200PCL5 = Array("HPZLSLHN.DLL", "HPZSSLHN.DLL", "HPZUILHN.DLL", "HPCDMCLH.DLL", "HPZ5RLHN.DLL", "HPZSMLHN.GPD", "HPZSTLHN.DLL", "HPMCPD25.CFG", "HPZ5CLHN.INI", "HPMCPDP5.XML", "HPZSCLHN.DTD", "HPZEVLHN.DLL", "HPZIDR12.DLL", "HPZINW12.DLL", "HPZIPM12.DLL", "HPZIPR12.DLL", "HPZIPT12.DLL", "HPZISN12.DLL", "HPBMIAPI.DLL", "HPBMINI.DLL", "HPBOID.DLL", "HPBOIDPS.DLL", "HPBPRO.DLL", "HPBPROPS.DLL", "HPEACLHN.HPI", "UNIRES.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL")
strHP1300PCL5 = "hp LaserJet 1300 PCL 5"
arrHP1300PCL5 = Array("HPZLSLHN.DLL", "HPZSSLHN.DLL", "HPZUILHN.DLL", "HPCDMCLH.DLL", "HPZ5RLHN.DLL", "HPZSMLHN.GPD", "HPZSTLHN.DLL", "HPMCPD25.CFG", "HPZ5CLHN.INI", "HPMCPDP5.XML", "HPZSCLHN.DTD", "HPZEVLHN.DLL", "HPZIDR12.DLL", "HPZINW12.DLL", "HPZIPM12.DLL", "HPZIPR12.DLL", "HPZIPT12.DLL", "HPZISN12.DLL", "HPBMIAPI.DLL", "HPBMINI.DLL", "HPBOID.DLL", "HPBOIDPS.DLL", "HPBPRO.DLL", "HPBPROPS.DLL", "HPEACLHN.HPI", "UNIRES.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL")
strHP4100PCL6 = "HP LaserJet 4100 Series PCL6"
arrHP4100PCL6 = Array("HPZEVWN7.DLL", "HPZSTWN7.DLL", "HPZUIWN7.DLL", "HPZ6RWN7.DLL", "HPZ6CWN7.INI", "HPZSMWN7.GPD", "HPZ6MWN7.GPD", "hpmcpap6.xml", "HPZSCWN7.DTD", "HPCDMCLH.DLL", "HPMCPAP6.CFG", "HPZLSWN7.DLL", "HPZSSWN7.DLL", "HPBMIAPI.DLL", "HPBMINI.DLL", "HPBOID.DLL", "HPBOIDPS.DLL", "HPBPRO.DLL", "HPBPROPS.DLL", "HPEACLHN.HPI", "HPZIDR12.DLL", "HPZINW12.DLL", "HPZIPM12.DLL", "HPZIPR12.DLL", "HPZIPT12.DLL", "HPZISN12.DLL", "UNIRES.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL", "PCLXL.DLL", "PCLXL.GPD", "P6FONT.GPD", "PJL.GPD", "P6DISP.GPD", "PCL5ERES.DLL")
strHP4200PCL6 = "HP LaserJet 4200 PCL 6"
arrHP4200PCL6 = Array("HPZEVLHN.DLL", "HPZSTLHN.DLL", "HPZUILHN.DLL", "HPZ6RLHN.DLL", "HPZ6CLHN.INI", "HPZSMLHN.GPD", "HPZ6MLHN.GPD", "HPC38O6L.XML", "HPZSCLHN.DTD", "HPCDMCLH.DLL", "HPLJ4200.CFG", "UNIRES.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL", "PCLXL.DLL", "PCLXL.GPD", "P6FONT.GPD", "PJL.GPD", "P6DISP.GPD", "PCL5ERES.DLL")
strHP4600PCL6 = "HP Color LaserJet 4600 PCL6"
arrHP4600PCL6 = Array("HPZEVLHN.DLL", "HPZSTLHN.DLL", "HPZUILHN.DLL", "HPZ6RLHN.DLL", "HPZ6CLHN.INI", "HPZSMLHN.GPD", "HPZ6MLHN.GPD", "HPC3JS6L.XML", "HPZSCLHN.DTD", "HPCDMCLH.DLL", "HPLJ4600.CFG", "UNIRES.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL", "PCLXL.DLL", "PCLXL.GPD", "P6FONT.GPD", "PJL.GPD", "P6DISP.GPD", "PCL5ERES.DLL")
strHPM400PCL6 = "HP LaserJet 400 M401 PCL 6"
arrHPM400PCL6 = Array("hpcm4016.cfg", "hpcm4016.xml", "hpcsc140.DTD", "hpcm401u.INI", "hpcP6.hpx", "hpc6m140.GPD", "hpchm140.gpd", "hpcsm140.GPD", "hpcui140.DLL", "hpcpe140.DLL", "hpc3r140.dll", "hpc6r140.DLL", "hpcbr140.dll", "hpcdmc64.DLL", "hpbcfgre.DLL", "cioum.dll", "CIOUM64.msi", "hpcst140.DLL", "hpcur140.dll", "hpmsn140.DLL", "hpmsl140.DLL", "hpcsn140.dem", "hpcsat20.dll", "hpcev140.DLL", "pclxl.DLL", "pjl.GPD", "pclxl.GPD", "HPCHL140.CAB", "UNIRES.DLL", "UNIDRVUI.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL", "hpcls140.DLL", "hpcss140.DLL", "hpcpn140.dll", "hpcpp140.dll", "hpcc6140.DLL", "hpbuio64.dll", "hppdvq01.dll", "hppccdvq64.dll", "hpfxcomw.dll")
strHPM600PCL6 = "HP LaserJet 600 M601 M602 M603 PCL6"
arrHPM600PCL6 = Array("hpcm6006.cfg", "hpcsc145.dtd", "hpcm600u.ini", "hpcm6006.xml", "hpcP6.hpx", "hpcdmc64.DLL", "hpbcfgre.DLL", "hpcui145.dll", "hpcpn145.dll", "hpcpe145.dll", "hpc6r145.dll", "cioum.dll", "cioum64.msi", "hpc6m145.gpd", "hpcsm145.gpd", "hpcst145.dll", "hpcur145.dll", "hpmsn145.dll", "hpmsl145.dll", "hpcsn145.dem", "hpcsat20.dll", "hpcev145.dll", "pclxl.dll", "pjl.gpd", "pclxl.gpd", "hpchl145.cab", "hpcls145.dll", "hpcss145.dll", "unires.dll", "unidrvui.dll", "stdnames.gpd", "stddtype.gdl", "stdschem.gdl", "stdschmx.gdl", "hpcpp145.dll", "hpcc6145.DLL", "hpfie145.dll", "hpcc3145.dll", "HPSecurePrint64.dll", "hpspw145.dll")
strHPP2050PCL6 = "HP LaserJet P2050 Series PCL6"
arrHPP2050PCL6 = Array("HPZEVWN7.DLL", "HPZSTWN7.DLL", "HPZUIWN7.DLL", "HPZ6RWN7.DLL", "HPZ6CWN7.INI", "HPZSMWN7.GPD", "HPZ6MWN7.GPD", "hpmcpap6.xml", "HPZSCWN7.DTD", "HPCDMCLH.DLL", "HPMCPAP6.CFG", "HPZLSWN7.DLL", "HPZSSWN7.DLL", "HPBMIAPI.DLL", "HPBMINI.DLL", "HPBOID.DLL", "HPBOIDPS.DLL", "HPBPRO.DLL", "HPBPROPS.DLL", "HPEACLHN.HPI", "HPZIDR12.DLL", "HPZINW12.DLL", "HPZIPM12.DLL", "HPZIPR12.DLL", "HPZIPT12.DLL", "HPZISN12.DLL", "UNIRES.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL", "PCLXL.DLL", "PCLXL.GPD", "P6FONT.GPD", "PJL.GPD", "P6DISP.GPD", "PCL5ERES.DLL")
strHPP3010PCL6 = "HP LaserJet P3010 Series PCL 6"
arrHPP3010PCL6 = Array("hpcp3010.CFG", "hpc30106.xml", "hpcsc083.DTD", "hpc3010u.INI", "hpcP6.hpx", "hpcdmc64.DLL", "hpbcfgre.DLL", "hpcui083.DLL", "hpcpe083.DLL", "hpc6r083.DLL", "cioum.dll", "CIOUM64.msi", "hpc6m083.GPD", "hpcsm083.GPD", "hpcst083.DLL", "hpcur083.dll", "hpmsn083.DLL", "hpmsl083.DLL", "hpcsn083.dem", "hpcsat20.dll", "hpcev083.DLL", "pclxl.DLL", "pjl.GPD", "pclxl.GPD", "HPCHL083.CAB", "UNIRES.DLL", "UNIDRVUI.DLL", "STDNAMES.GPD", "STDDTYPE.GDL", "STDSCHEM.GDL", "STDSCHMX.GDL", "hpcls083.DLL", "hpcss083.DLL", "hpcpn083.dll", "hpcc6083.DLL")
strTOSH455PCL6 = "TOSHIBA e-STUDIO455Series PCL6"
arrTOSH455PCL6 = Array("eS4px6wm.exe", "eS4px6.XPI", "eS4pCDTP.dll", "eS4pCIP.dll", "eSPDLD.chm", "eS4pCVal.xml", "eS4px6pr.gxl", "eS4pPrc.dll", "eSTSPVen.lbf", "eS4pxjp.bin", "eS4pxuc.bin", "eS4pxeu.bin", "eS4pFN.xml", "eS4pCCFG.dll", "eS4pPCF.dll", "eSPDLDL6.dll", "eS4PDLD6.dll", "eST4snm6.dll", "eS4pLD.bin")
strTOSH855PCL6 = "TOSHIBA e-STUDIO855Series PCL6"
arrTOSH855PCL6 = Array("eS8nx6wm.exe", "eS8nx6.XPI", "eS8nCDTP.dll", "eS8nCIP.dll", "eSPDLD.chm", "eS8nxuc.bin", "eS8nxeu.bin", "eS8nxjp.bin", "eS8nCVal.xml", "eS8nx6pr.gxl", "eS8nPrc.dll", "eSTSPVen.lbf", "eS8nFN.xml", "eS8nCCFG.dll", "eS8nPCF.dll", "eSPDLDL6.dll", "eS4PDLD6.dll", "eST4snm6.dll", "eS8nLD.bin")
strTOSH6530PCL6 = "TOSHIBA e-STUDIO6530CSeriesPCL6"
arrTOSH6530PCL6 = Array("eS6cx6wm.exe", "eS6cx6.XPI", "eS6cDTP.dll", "eS6cIP.dll", "eSPDLD.chm", "eS6cxpr.gxl", "eS6cVal.xml", "eS6cxeu.bin", "eS6cxjp.bin", "eS6cxuc.bin", "eS6cPrc.dll", "eSTSPVen.lbf", "eS6cFN.xml", "eS6cCFG.dll", "eS6cPCF.dll", "eSPDLDL6.dll", "eS4PDLD6.dll", "eST4snm6.dll", "eS6cLD.bin")

Set objRegistry = GetObject("winmgmts:\\" & strCompName & "\root\default:StdRegProv")
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKeyBasePath, arrSubKeys

For Each SubKey in arrSubKeys

strDriverKeyPath = strKeyBasePath & "\" & Subkey

Return = objRegistry.GetMultiStringValue(HKEY_LOCAL_MACHINE,strDriverKeyPath, strValueName, arrDependentFiles)

If UBound(arrDependentFiles) = "-1" Then
	
	Select Case SubKey
		Case strHP1200PCL5
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHP1200PCL5
			blnFixInvoked = True
		Case strHP1300PCL5
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHP1300PCL5
			blnFixInvoked = True
		Case strHP4100PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHP4100PCL6
			blnFixInvoked = True
		Case strHP4200PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHP4200PCL6
			blnFixInvoked = True
		Case strHP4600PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHP4600PCL6
			blnFixInvoked = True
		Case strHPM400PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHPM400PCL6
			blnFixInvoked = True
		Case strHPM600PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHPM600PCL6
			blnFixInvoked = True
		Case strHPP2050PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHPP2050PCL6
			blnFixInvoked = True
		Case strHPP3010PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrHPP3010PCL6
			blnFixInvoked = True
		Case strTOSH455PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrTOSH455PCL6
			blnFixInvoked = True
		Case arrTOSH855PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrTOSH855PCL6
			blnFixInvoked = True
		Case strTOSH6530PCL6
			objRegistry.SetMultiStringValue HKEY_LOCAL_MACHINE, strDriverKeyPath, strValueName, arrTOSH6530PCL6
			blnFixInvoked = True
	End Select
	
End If

Next

If blnFixInvoked = True Then
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strCompName & "\root\cimv2")
Set colServices = objWMIService.ExecQuery("Select * from Win32_Service where DisplayName = 'Print Spooler'")

For Each objService in colServices
	objService.StopService
	WScript.Sleep(5000)
	objService.StartService
Next
End If

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...