JSI Tip 10551. Windows XP has printing problems, including adding printers and viewing printer icons?

If the Print Spooler service is corrupted on a Windows XP computer, you could experience any of the following:

- The Print Spooler service is stopped and does not start when you restart the computer.

- When you attempt use the Add Printer Wizard, you receive a message similar to Operation cannot be completed.

- When you try to start the Print Spooler service, you receive an error similar to Error 5: Access Denied.

- You cannot print when you double-click the Printers and Faxes icon in Control Panel.

- There are no printer icons visible when you double-click the Printers and Faxes icon in Control Panel.

I have scripted FixSpoolsv.bat to list the available Print Spooler executables on your computer, from newest to oldest, bypassing the current %SystemRoot%\System32\spoolsv.exe file. To run FixSpoolsv.bat, open a CMD.EXE window and type FixSpoolsv.

To use one of the previous versions of Spoolsv.exe:

01. Restart the computer.

02. When the BIOS information is displayed, press F8.

03. Select Safe Mode from the Windows Advanced Options and press Enter.

04. Select the operating system that you want to start in Safe Mode and press Enter.

05. Open a CMD.EXE window.

06. Delete the %SystemRoot%\System32\spoolsv.exe file.

07. Copy the previous version to %SystemRoot%\System32\spoolsv.exe and to %SystemRoot%\SYSTEM32\DLLCACHE\spoolsv.exe.

If none of the previous versions work:

01. Restart the computer.

02. When the BIOS information is displayed, press F8.

03. Select Safe Mode from the Windows Advanced Options and press Enter.

04. Select the operating system that you want to start in Safe Mode and press Enter.

05. Open a CMD.EXE window.

06. Delete the %SystemRoot%\System32\spoolsv.exe file.

07. Insert the Windows XP CD-ROM, holding down the SHIFT key to prevent the Windows XP installation from starting.

08. Type the following commands and press Enter, where <CD-ROM Drive:> is the CD-ROM drive letter:

Expand <CD-ROM Drive:>\i386\spoolsv.ex_ %SystemRoot%\System32\spoolsv.exe
Expand <CD-ROM Drive:>\i386\spoolsv.ex_ %SystemRoot%\SYSTEM32\DLLCACHE\spoolsv.exe

FixSpoolsv.bat contains:

@echo off
setlocal ENABLEDELAYEDEXPANSION
set f1=find /i /V "%SystemRoot%\System32\spoolsv.exe"
if exist "%TEMP%\FixSpoolSv.TM1" del /q "%TEMP%\FixSpoolSv.TM1"
if exist "%TEMP%\Dte2YMD.vbs" goto FX2
@echo Dim Arguments, sd>"%TEMP%\Dte2YMD.vbs"
@echo Set Arguments = Wscript.Arguments>>"%TEMP%\Dte2YMD.vbs"
@echo sd = Arguments(0)>>"%TEMP%\Dte2YMD.vbs"
@echo yyyy = DatePart("yyyy", sd)>>"%TEMP%\Dte2YMD.vbs"
@echo m = Right(100+DatePart("m", sd),2)>>"%TEMP%\Dte2YMD.vbs"
@echo d = Right(100+DatePart("d", sd),2)>>"%TEMP%\Dte2YMD.vbs"
@echo Wscript.Echo yyyy ^& " " ^& m ^& " " ^& d>>"%TEMP%\Dte2YMD.vbs"
:FX2
for /f "Tokens=*" %%x in ('dir /b /s /a spoolsv.ex*^|%f1%') do (
 for /f "Tokens=1-3" %%a in ('cscript //nologo "%TEMP%\Dte2YMD.vbs" %%~tx') do (
   set YY=%%a
   set MM=%%b
   set DD=%%c
 )
 @echo !YY!!MM!!DD!,"%%x">>"%TEMP%\FixSpoolSv.TM1"
)
if not exist "%TEMP%\FixSpoolSv.TM1" goto err
sort /R "%TEMP%\FixSpoolSv.TM1" /O "%TEMP%\FixSpoolSv.TM2"
del /q "%TEMP%\FixSpoolSv.TM1"
for /f "Tokens=1* Delims=," %%i in ('type "%TEMP%\FixSpoolSv.TM2"') do (
 @echo %%i %%j
)
del /q "%TEMP%\FixSpoolSv.TM2"
endlocal
goto :EOF
:err
@echo No copies of spoolsv.exe or spoolsv.ex_ found.
endlocal



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish