I'm posting this in case anyone else might find it useful, as I couldn't find the answer easily on the net when I had a problem with dodgy / corrupted printer drivers on our client PC's.
I like Windows 7, but one thing has proved very difficult, and that is deleting printer drivers. Sometimes it works fine, sometimes you have to stop & start the print spooler and then the driver deletes and sometimes you just can't delete the driver because you get the irritating "currently in use" message. You would think that maybe a reboot will sort it, but unfortnately it doesn't and your stuck.
One way around this issue was to right click on the print driver and click "remove driver package" and then before you click "delete", open a command prompt and type "net stop spooler" followed by "net start spooler". If you hit "delete" on you printer driver the very instant the spooler started you could succesfully delete the driver if you were fast enough. This was fine for the odd occassion but not if you have a number of PC's to delete drivers from.
I then found a hint on the net after some serious digging and put together my own dos batch file. As it says in the header, it will delete all the printers and drivers (32-bit) (including local and virtual printers) from the PC it is run on. It uses windows 7's build-in scripts to delete the printers and drivers. It seems that a reg entry gets in the way of deleting the drivers normally, so deleting it before and putting it back afterwards solves the problem.
Use this at your own risk, and obviously adapt it for your own use if need be.
Code:@echo off echo WARNING! This script will delete ALL (32-bit) printers and drivers (including local and virtual printers) from the local PC. Press control and C to stop this batch file. echo. pause C: CD "C:\Windows\System32\Printing_Admin_Scripts\en-US" cscript prnmngr.vbs -xc net stop spooler reg delete "hklm\system\currentcontrolset\control\print\environments\windows nt x86\print processors" /f net start spooler cscript prndrvr.vbs -x reg add "hklm\system\currentcontrolset\control\print\environments\windows nt x86\print processors\winprint" /v Driver /t reg_sz /d winprint.dll net stop spooler net start spooler pause
There are currently 1 users browsing this thread. (0 members and 1 guests)