deathstardan Posted October 15, 2021 Posted October 15, 2021 (edited) Hi all, We experienced an issue due to the new windows update KB5006670. Symptoms were prints appearing as local downlevel documents and word/excel etc crashing when printing (funnily enough only to our Kyocera printers). mPisano over at https://www.bleepingcomputer.com/forums/t/759880/kb5006670-network-printer-problems-again-this-month/page-5 posted a script and we can confirm it has sorted our issues so I thought I would make a post here in case anyone else has the same issues! You will need to get the good files from a machine in the system32 folder that hasn't got the KB5006670 update (or one that you've uninstalled it from) and host them in a centralised location, you must also add .good at the end as it won't work otherwise (speaking from experience)! We then added this script to a startup GPO, did a gpupdate /force and restarted. Hope this helps someone. @echo off REM 10.0.19041.1288 bad file comes from KB5006670 :_start copy "\\YourDomain.local\spoolerfix\win32spl.dll.good" C:\Windows\System32 /y copy "\\YourDomain.local\spoolerfix\spoolsv.exe.good" C:\Windows\System32 /y copy "\\YourDomain.local\spoolerfix\localspl.dll.good" C:\Windows\System32 /y :wmicVersion pathToBinary [variableToSaveTo] setlocal :_test_win32spl set "item1=C:\Windows\System32\win32spl.dll" set "item1=%item1:\=\\%" set "item2=C:\Windows\System32\win32spl.dll.good" set "item2=%item2:\=\\%" for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE name='%item1%' get Version /format:Textvaluelist"`) do ( for /f "delims=" %%# in ("%%a") do set "%%#") set existver=%version% set version= for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE name='%item2%' get Version /format:Textvaluelist"`) do ( for /f "delims=" %%# in ("%%a") do set "%%#") set goodver=%version% set version= echo %existver% echo %goodver% IF %goodver%==%existver% echo "Files are same version" && goto _test_localspl IF "%existver%"=="10.0.19041.1288" echo "Files are bad version" && goto _fix_win32spl IF NOT %goodver%==%existver% echo "Files are different version" && goto _test_localspl :_test_localspl set "item1=C:\Windows\System32\localspl.dll" set "item1=%item1:\=\\%" set "item2=C:\Windows\System32\localspl.dll.good" set "item2=%item2:\=\\%" for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE name='%item1%' get Version /format:Textvaluelist"`) do ( for /f "delims=" %%# in ("%%a") do set "%%#") set existver=%version% set version= for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE name='%item2%' get Version /format:Textvaluelist"`) do ( for /f "delims=" %%# in ("%%a") do set "%%#") set goodver=%version% set version= echo %existver% echo %goodver% IF %goodver%==%existver% echo "Files are same version" && goto _test_spoolsv IF "%existver%"=="10.0.19041.1288" echo "Files are bad version" && goto _fix_localspl IF NOT %goodver%==%existver% echo "Files are different version" && goto _test_spoolsv :_test_spoolsv set "item1=C:\Windows\System32\spoolsv.exe" set "item1=%item1:\=\\%" set "item2=C:\Windows\System32\spoolsv.exe.good" set "item2=%item2:\=\\%" for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE name='%item1%' get Version /format:Textvaluelist"`) do ( for /f "delims=" %%# in ("%%a") do set "%%#") set existver=%version% set version= for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE name='%item2%' get Version /format:Textvaluelist"`) do ( for /f "delims=" %%# in ("%%a") do set "%%#") set goodver=%version% set version= echo %existver% echo %goodver% IF %goodver%==%existver% echo "Files are same version" && goto _end IF "%existver%"=="10.0.19041.1288" echo "Files are bad version" && goto _fix_spoolsv IF NOT %goodver%==%existver% echo "Files are different version" && goto _end goto _end :_fix_win32spl net stop spooler timeout /t 3 /nobreak Takeown /A /F C:\Windows\System32\win32spl.dll icacls "C:\Windows\System32\win32spl.dll" /grant builtin\administrators:F icacls "C:\Windows\System32\win32spl.dll" /grant SYSTEM:F ren C:\Windows\System32\win32spl.dll win32spl-%existver%.dll copy C:\Windows\System32\win32spl.dll.good C:\Windows\System32\win32spl.dll /Y goto _test_localspl :_fix_localspl net stop spooler timeout /t 3 /nobreak Takeown /A /F C:\Windows\System32\localspl.dll icacls "C:\Windows\System32\localspl.dll" /grant builtin\administrators:F icacls "C:\Windows\System32\localspl.dll" /grant SYSTEM:F ren C:\Windows\System32\localspl.dll localspl-%existver%.dll copy C:\Windows\System32\localspl.dll.good C:\Windows\System32\localspl.dll /Y goto _test_spoolsv :_fix_spoolsv net stop spooler timeout /t 3 /nobreak Takeown /A /F C:\Windows\System32\spoolsv.exe icacls "C:\Windows\System32\spoolsv.exe" /grant builtin\administrators:F icacls "C:\Windows\System32\spoolsv.exe" /grant SYSTEM:F ren C:\Windows\System32\spoolsv.exe spoolsv-%existver%.exe copy C:\Windows\System32\spoolsv.exe.good C:\Windows\System32\spoolsv.exe /Y goto _end :_end net start spooler exit Edited October 15, 2021 by deathstardan
JScott Posted October 15, 2021 Posted October 15, 2021 Thanks, some of our laptops that have the same issue are not on the domain. Not sure if this would help, can we copy the files to this location?
deathstardan Posted October 15, 2021 Author Posted October 15, 2021 (edited) Thanks, some of our laptops that have the same issue are not on the domain. Not sure if this would help, can we copy the files to this location? I would assume so, we did have issues copying directly to the system32 folder (assuming it's due to localinstaller having permissions?) which the script seems to bypass. edit: perhaps you could put the files on a USB and set the location of the good files as the USB? Edited October 15, 2021 by deathstardan
JScott Posted October 15, 2021 Posted October 15, 2021 Looking at the USB option now. Not sure what we can do when the November update replaces them again.
deathstardan Posted October 15, 2021 Author Posted October 15, 2021 Looking at the USB option now. Not sure what we can do when the November update replaces them again. Albeit a pain, I guess you would do the same thing. Unless more files are affected!
Fazza Posted October 19, 2021 Posted October 19, 2021 Just trying the above script and instead of crashing out we now get the following error saying theres a problem with the printer setup: Anyone come across this after replacing the 3 files in the script?
deathstardan Posted October 20, 2021 Author Posted October 20, 2021 Just trying the above script and instead of crashing out we now get the following error saying theres a problem with the printer setup: [ATTACH=CONFIG]63428[/ATTACH] Anyone come across this after replacing the 3 files in the script? Hi Fazza, I haven't no. Have you tried removing the printers and re-adding them?
Koldov Posted October 21, 2021 Posted October 21, 2021 (edited) @Fazza - can you confirm you are having the same problem and have previous workarounds (Point and Print + regedits) applied...? Well I can confirm this works on a test VM of LTSC (October CU), but not as expected... I had the same problem as the OP, with my test VM I couldn't add a printer and when I finally managed it I couldn't print! http://www.edugeek.net/forums/windows-10/224377-2021-10-cu-kb5006672-cannot-print-3.html#post1923125 I ran the script, but it seemed to error a lot so I checked the file location and found that it had copied the files but had not renamed them. It had renamed the current files but had not taken the .good from the end of the files copied in (once I did that it seemed to work ok)... EDIT: This also seems to change the behaviour I have seen where a very old driver was denied (complaining about a policy in force that prevented NT 4.0 drivers being installed). Edited October 21, 2021 by Koldov
Koldov Posted October 21, 2021 Posted October 21, 2021 Also just to catch people who are on this thread but not the other couple on similar topics... Of those who are having problems and previous workarounds not helping with this particular issue, could you tell me if you have this (or similar) set in your domain?
gsk Posted November 12, 2021 Posted November 12, 2021 Still getting this happen on the odd machine- mostly a pain with non-domain or mobile laptops connecting to ‘foreign’ network printers. What’s the long term fix?
deathstardan Posted November 12, 2021 Author Posted November 12, 2021 Still getting this happen on the odd machine- mostly a pain with non-domain or mobile laptops connecting to ‘foreign’ network printers. What’s the long term fix? We've recently ran into new issues here since the newest update which is great! So I couldn't help you as of yet. If we find anything I will be sure to update you.
Koldov Posted November 12, 2021 Posted November 12, 2021 Might be some help here... http://www.edugeek.net/forums/windows-10/223374-printing-issues-driver-update-needed-19.html#post1926153
Fazza Posted November 15, 2021 Posted November 15, 2021 Once we'd got hold of the 3 good files the above script worked a treat! Only issue now is that KB5007186 appears to fix the issue, but if the above script has been run then it doesnt work so - has any one re-jigged the above script to put the original files back so that when KB5007186 is applied it works?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now