How to Remove Printers With Batch Files
By Ruri Ranbe
Businesses can use batch files to perform routines on one or more workstations; the files contain script used to execute a sequence of commands. An administrator looking to remove a printer from multiple PCs in an office can insert the appropriate command in a batch file and then run the file on each computer, allowing him to delete the device in seconds instead of manually inputting the command for every workstation.
Click "Start | All Programs | Accessories | Notepad." Enter the following text into the application:
rundll32 printui.dll,PrintUIEntry /dl /c[Computer] /n "[Printer Name]"
Replace "[Computer]" with the name of the PC and "[Printer Name]" with the name of the device (minus the quotes and brackets around the names throughout all steps).
Create a new line and follow the same instructions as above to remove additional printers from the workstation.
Click "File," then "Save As." Create a name for the batch file and then add ".bat" to the end of the file name.
Select "All Files (.)" from the Save as Type drop-down menu. Click "Save" to create the batch file.
Click "Start" and then enter "[file location][file name].bat" into the search field.
Replace "[file location]" with the file path associated with the batch file and "[file name]" with the name of the file.
Press "Enter" to remove the printers from the target PC.
To remove additional printers, create a new line and enter the same code as above, replacing "[Printer Name]" with the appropriate model.
Ruri Ranbe has been working as a writer since 2008. She received an A.A. in English literature from Valencia College and is completing a B.S. in computer science at the University of Central Florida. Ranbe also has more than six years of professional information-technology experience, specializing in computer architecture, operating systems, networking, server administration, virtualization and Web design.