Questions

Delete global printer

+
0 Votes
Locked

Delete global printer

suncadd
How do you delete a global printer that is no longer connected to the server?
I have a printer that was installed by:
rundll32 printui.dll,PrintUIEntry /ga /n\\servername\printername

The server crashed and replaced by one with a different name. The commmand: rundll32 printui.dll,PrintUIEntry /gd /n\\servername\printername does not work apparently because the servername does not exist.
  • +
    0 Votes
    the_dorseys

    Is this on one machine or multiple machines?
    If it is one enumerate the per-machine connections:
    rundll32 printui.dll PrintUIEntry /ge

    Note the servername\printer

    The simply delete the connection by:
    rundll32 printui.dll PrintUIEntry /gd /n\\servername\printer

    This assumes this is local...if not you can do the same thing with the /c\\computername

    The per-machine connection is wrritten to
    HKEY_USERS\.DEFAULT\PRINTERS\CONNECTIONS

  • +
    0 Votes
    the_dorseys

    Is this on one machine or multiple machines?
    If it is one enumerate the per-machine connections:
    rundll32 printui.dll PrintUIEntry /ge

    Note the servername\printer

    The simply delete the connection by:
    rundll32 printui.dll PrintUIEntry /gd /n\\servername\printer

    This assumes this is local...if not you can do the same thing with the /c\\computername

    The per-machine connection is wrritten to
    HKEY_USERS\.DEFAULT\PRINTERS\CONNECTIONS