Here is my situation: I need to remove network shared printers from client computers. The printers were originally shared from a SBS03 box, but the SBS03 box is no longer on the network. AD and printer sharing has been taken over by a 2008r2 box. The problem is that many computers still have a connection to the printers shared from the SBS03 box. I have the following commands in my login script:
rundll32 printui.dll,PrintUIEntry /dn /n\\OLD_SERVER\PRINTER1
rundll32 printui.dll,PrintUIEntry /dn /n\\OLD_SERVER\PRINTER2
This is working well, but here is the snag: Every login after the first, the users get an error that states:
"Printer connection cannot be removed. Double check the printer name and make sure that the printer is connected to the network."
Is there a way to suppress messages from PrintUI.DLL or force it to run silently?