If a regular user has added a printer by going to a share \\share and then right clicked on a printer and then clicked 'connect', how can that be removed by an administrator?

I have tried prnmngr.vbs and rundll32 commands but they do not affect printers added in this way. Is there a way that they can be removed via commandline without the use of a login/logoff script?

This is a Windows XP machine in a server 2003 domain.

link|improve this question

75% accept rate
feedback

2 Answers

up vote 4 down vote accepted

I've had great luck with

rundll32 printui.dll,PrintUIEntry /dn /q /n\\Server_Name\Share_name
link|improve this answer
feedback

Sometimes, the printui.dll method does not work - especially if the printer queue is no longer available on the server or currently not accessible. To remove client-connected printers in these cases, you might consider just deleting the appropriate values from the HKCU\Printers\Connections regkey.

link|improve this answer
Interesting, I've only had issues with removing printers with out a printer queue with cscript %systemroot%\system32\prnmngr.vbs -d -p "\\server_name\share_name". After I found the printui.dll one, I haven't had an issue since. Good key to know however – Nixphoe Jun 16 '11 at 21:40
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.