# vbs printer script



## markyboyZ1300 (May 12, 2006)

Not sure if I am posting to the right place so I apologise in advance if I am.

I have this script:-


Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "j:", "\\24.225.1.10\company"
wshnetwork.mapnetworkdrive "k:", "\\24.225.1.10\it"

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\24.225.1.10\hp4200"
WshNetwork.AddWindowsPrinterConnection PrinterPath

set wshnetwork = wscript.createobject("wscript.network")
PrinterPath = "\\24.225.1.10\hp LaserJet 1320 PCL 6"
wshnetwork.addwindowsprinterconnection printerpath

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\24.225.1.10\hp5cap"
WshNetwork.AddWindowsPrinterConnection PrinterPath

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\24.225.1.11\epsonal-"
WshNetwork.AddWindowsPrinterConnection PrinterPath

set wshnetwork = wscript.createobject("wscript.network")
printerpath = "\\24.225.1.10\ricoh 3235c"
wshnetwork.addwindowsprinterconnection printerpath


What I want to do is put it in the startup dir of each workstation so the correct printers for each area in the office will print to the right place.
What I would like to know is is it possible to put in a command to see if the printers are already installed with an "if exists then" type command so that it will not execute more than once?

I hope I have come across clearly enough and I welcome your comments
Thanks very much


----------

