check if printer name exists

Discussion in 'Scripting' started by stev379, Nov 17, 2005.

  1. stev379

    stev379 Guest

    How can have a logon script check if a certain printer exists?
    I may be way off with below. Obviously the "If" statement below won't work.
    just to illustrate what I'm trying to do.
    Any help or suggestions are appreciated.

    If Printer exists "\\\"+PrinterName Then

    DelName = \\SERVERNAME\"+PrinterName
    DelName2 = \\"+PrinterName
    WshNet.RemovePrinterConnection DelName
    WshNet.RemovePrinterConnection DelName2

    End if
    stev379, Nov 17, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.