Re: Print Spooler error
Hello.
Some tips that worked for me while i used in this way the printer
drivers. I had an script, that searched for orphan printers (printers
that users that disconnect of the system and the printer stay there,
created, but associated to the limbo). after that, the script stop,
clear locked jobs (usually from the same ghost printers) and restarted
the print spooler. Something like the two files below (it depends of
the use. When i stopped using them, i was running as scheduled task 3
or 4 times per day). But, as Jeff told you... your best bet, is a
third party printer driver. You´ll never more bother with users
calling you or your team, or yet rebooting servers.
1. limpaorfaauto.vbs
---
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
Set WshShell =CreateObject("WScript.Shell")
i=1
RegPre1 = "SYSTEM\CurrentControlSet\Control\DeviceClasses
\{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\##?
#Root#RDPDR#0000#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\#TS00"
do until i=9
strKeyPath = RegPre1 & i & "\Device Parameters\"
strDelPath = RegPre1 & i
strDelFullPath1 = "HKEY_LOCAL_MACHINE\" & RegPre1 & i & "\Control\"
strDelFullPath2 = "HKEY_LOCAL_MACHINE\" & RegPre1 & i & "\Device
Parameters\"
strDelFullPath3 = "HKEY_LOCAL_MACHINE\" & RegPre1 & i & "\"
strValueName = "Port Description"
strSession = i
oReg.GetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
if strValue = "Inactive TS Port" then
''Wscript.Echo strDelFullpath
''Wscript.Echo strSession & "- Port Description Value: " & strValue
'oReg.DeleteKey HKEY_LOCAL_MACHINE, strDelPath
WshShell.RegDelete strDelFullPath1
WshShell.RegDelete strDelFullPath2
WshShell.RegDelete strDelFullPath3
End if
i=1+i
loop
i=10
RegPre2 = "SYSTEM\CurrentControlSet\Control\DeviceClasses
\{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\##?
#Root#RDPDR#0000#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\#TS0"
do until i=99
strKeyPath = RegPre2 & i & "\Device Parameters\"
strDelPath = RegPre2 & i
strDelFullPath4 = "HKEY_LOCAL_MACHINE\" & RegPre2 & i & "\Control\"
strDelFullPath5 = "HKEY_LOCAL_MACHINE\" & RegPre2 & i & "\Device
Parameters\"
strDelFullPath6 = "HKEY_LOCAL_MACHINE\" & RegPre2 & i & "\"
strValueName = "Port Description"
strSession = i
oReg.GetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
if strValue = "Inactive TS Port" then
'Wscript.Echo strDelFullpath
'Wscript.Echo strSession & "- Port Description Value: " & strValue
WshShell.RegDelete strDelFullPath4
WshShell.RegDelete strDelFullPath5
WshShell.RegDelete strDelFullPath6
End if
i=1+i
loop
i=100
RegPre3 = "SYSTEM\CurrentControlSet\Control\DeviceClasses
\{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\##?
#Root#RDPDR#0000#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}\#TS"
do until i=999
strKeyPath = RegPre3 & i & "\Device Parameters\"
strDelPath = RegPre3 & i
strDelFullPath7 = "HKEY_LOCAL_MACHINE\" & RegPre3 & i & "\Control\"
strDelFullPath8 = "HKEY_LOCAL_MACHINE\" & RegPre3 & i & "\Device
Parameters\"
strDelFullPath9 = "HKEY_LOCAL_MACHINE\" & RegPre3 & i & "\"
strValueName = "Port Description"
strSession = i
oReg.GetStringValue
HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
if strValue = "Inactive TS Port" then
'Wscript.Echo strDelFullpath
'Wscript.Echo strSession & "- Port Description Value: " & strValue
WshShell.RegDelete strDelFullPath7
WshShell.RegDelete strDelFullPath8
WshShell.RegDelete strDelFullPath9
End if
i=1+i
loop
---
2. CleanSpoolPrinters.bat
---------
cscript limpaorfasauto.vbs
net stop spooler
ECHO Clearing locked jobs...
ECHO Waiting 10 secs...
CHOICE /T 10 /D y > NUL
del /Q C:\WINDOWS\system32\spool\PRINTERS
ECHO Restarting print spooler...
net start spooler
----------
The Most King Regards,
Germano.
Porto Alegre - RS - Brazil
On Aug 15, 12:40 pm, jcpierce <jcpie...@discussions.microsoft.com>
wrote:
> I have not deleted all the print drivers. I have added only a few drivers in
> the last 6 months. I have updated all the drivers. Are you saying that I
> need to use a universal print driver for all printers? Wouldn't this also
> need to be set on each client PC?
>
> "Jeff Pitsch" wrote:
> > You've gone and deleted all the print drivers and then tested them correct
> > individually correct? Your best bet is a 3rd party universal print driver
> > from Provision Network, Tricerat, or ThinPrint.
>
> > --
> > Jeff Pitsch
> > Microsoft MVP - Terminal Services
>
> > "jcpierce" <jcpie...@discussions.microsoft.com> wrote in message
> >news:B80D0743-F72F-4E54-91FF-7032742B3536@microsoft.com...
> > >I am running Windows Server 2003 SP1. Once a week, the print spool stops
> > > working. If I restart it, the remote users get locked out of the system
> > > and
> > > they cannot log back in. My only option is to reboot the server. When I
> > > reboot the server service hungs on starting. I have tried all the options
> > > I
> > > could find in google (modifying the registry) and that still did not work.
> > > I
> > > usually have to stop and start the print spooler and the server server and
> > > reboot 2 -3 times before the server comes back online so users can log in.
>
> > > What else can I do? Has anyone else experienced this type of problem?