Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi I am trying to write a batch file to delete old printers and drivers and add the new printers.
It all seems to be working fine except one thing.
Not all of the computers will have the universal print driver. So the ones that don't have it generates an error which pops up on the screen. I would like this to be seamless to the user, so if they don't have the driver instead of creating and error and generating a pop up I would like it to just skip it and go to installing the new printers.Any help would be greatly appreciated.
REM Delete printersrundll32 printui.dll,PrintUIEntry /dn /n\\PGDC01\PGPR01
rundll32 printui.dll,PrintUIEntry /dn /n\\PGDC01\PGPR02
rundll32 printui.dll,PrintUIEntry /dn /n\\PGDC01\PGPR03
REM Remove Printer Drivers for Plotter, 9500 & accountingRUNDLL32 PRINTUI.DLL,PrintUIEntry /dd /c\\%computername% /m "HP LaserJet P2015 Series PCL 5e" /h "Intel" /v "Windows 2000"
RUNDLL32 PRINTUI.DLL,PrintUIEntry /dd /c\\%computername% /m "HP Color LaserJet 9500 mfp PCL 6" /h "Intel" /v "Windows 2000"
RUNDLL32 PRINTUI.DLL,PrintUIEntry /dd /c\\%computername% /m "HP Designjet T1100 44in HPGL2" /h "Intel" /v "Windows 2000"
RUNDLL32 PRINTUI.DLL,PrintUIEntry /dd /c\\%computername% /m "HP Universal Printing PCL6" /h "Intel" /v "Windows 2000"REM Add printers Plotter, 9500 & Accounting
rundll32 printui.dll,PrintUIEntry /in /n\\PGDC01\HP9500
rundll32 printui.dll,PrintUIEntry /in /n\\PGDC01\Accounting
rundll32 printui.dll,PrintUIEntry /in /n\\PGDC01\Plotter

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |