Question Locked

Deleting Printers using printui.dll commands

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

At the moment i use login scripts (batch files) to add printers to local machines from the server. e.g.
Rundll32 printui.dll,PrintUIEntry /ga /n\\server\printer-64

However, i want to be able to delete all current printers on the local machine before adding the printers again. Does anyone know of a command to wipe all printers rather than individually?

3 replies

by ic-it

Copied from here;

http://www.computerperformance.co.uk/ezine/ezine16a.htm

Note change this line to reflect your actual print server's name;
set pserver=CLTLBXPRN

@echo off

path=c:\util;%path%

set pserver=CLTLBXPRN

echo Remove All Network Printers.......

con2prt /f

echo Show All Available Printers From %pserver%.......

net view %pserver%

set /p pname= Enter Printer Name:

rundll32 printui.dll,PrintUIEntry /in /n\\%pserver%\%pname% /q

set pserver=

set pname=

exit

by 1cainr

I have the command:

Rundll32 printui.dll,PrintUIEntry /in /q /n\\server\printer01

But for some reason it doesnt quietly install, anyone have any ideas?

Thank you

Richard

This discussion is closed to new replies.