Printer Installation 
Author Message
 Printer Installation

I am creating a login script that will automatically install network
printers to each client workstation.

The following Script will install the printers

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\Leadsmail\HP4500"
PrinterDriver = "HP Color LaserJet 4500 PCL 6"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

PrinterPath = "\\Leadsmail\HP5SI"
PrinterDriver = "HP LaserJet 5Si PCL 5e"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

PrinterPath = "\\Leadsmail\HP8000"
PrinterDriver = "HP LaserJet 8000 Series PCL 6"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

PrinterPath = "\\Leadsmail\Fiery_X3"
PrinterDriver = "Fiery x3e 65BW-M"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDrive

The problem I have is I want to check first if printer is installed
before actually running the VBS. I cannot figure out what commands to
use. I have searched the web, but to no avail.

Does anyone have any suggestions?



Tue, 02 Aug 2005 01:29:37 GMT  
 Printer Installation
The most effective way I can think of to check for preexisting printer
connections is to use WMI.  If you've never worked with WMI before, it can
be a little intimidating.  However, the Microsoft Scripting Guys have
written some excellent articles on WMI for beginners.  They've also release
their homegrown Scriptomatic tool
(http://www.microsoft.com/technet/treeview/default.asp?url=/technet/sc...
nter/scrguide/sagsas_overview.asp) which can take a lot of the work out of
writing WMI Scripts.  Check it out.

--Ben


Quote:
> I am creating a login script that will automatically install network
> printers to each client workstation.

> The following Script will install the printers

> Set WshNetwork = CreateObject("WScript.Network")
> PrinterPath = "\\Leadsmail\HP4500"
> PrinterDriver = "HP Color LaserJet 4500 PCL 6"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

> PrinterPath = "\\Leadsmail\HP5SI"
> PrinterDriver = "HP LaserJet 5Si PCL 5e"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

> PrinterPath = "\\Leadsmail\HP8000"
> PrinterDriver = "HP LaserJet 8000 Series PCL 6"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

> PrinterPath = "\\Leadsmail\Fiery_X3"
> PrinterDriver = "Fiery x3e 65BW-M"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDrive

> The problem I have is I want to check first if printer is installed
> before actually running the VBS. I cannot figure out what commands to
> use. I have searched the web, but to no avail.

> Does anyone have any suggestions?



Tue, 02 Aug 2005 02:05:13 GMT  
 Printer Installation

You might be able to make use of this ...(taken from Wscript5.6 docs)

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set oPrinters = WshNetwork.EnumPrinterConnections
WScript.Echo "Network printer mappings:"

For i = 0 to oPrinters.Count - 1 Step 2
    WScript.Echo "Port " & oPrinters.Item(i) & " = " & oPrinters.Item(i+1)
Next

TDM


Quote:
> I am creating a login script that will automatically install network
> printers to each client workstation.

> The following Script will install the printers

> Set WshNetwork = CreateObject("WScript.Network")
> PrinterPath = "\\Leadsmail\HP4500"
> PrinterDriver = "HP Color LaserJet 4500 PCL 6"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

> PrinterPath = "\\Leadsmail\HP5SI"
> PrinterDriver = "HP LaserJet 5Si PCL 5e"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

> PrinterPath = "\\Leadsmail\HP8000"
> PrinterDriver = "HP LaserJet 8000 Series PCL 6"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

> PrinterPath = "\\Leadsmail\Fiery_X3"
> PrinterDriver = "Fiery x3e 65BW-M"
> WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDrive

> The problem I have is I want to check first if printer is installed
> before actually running the VBS. I cannot figure out what commands to
> use. I have searched the web, but to no avail.

> Does anyone have any suggestions?



Wed, 03 Aug 2005 02:02:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Multiple Printer Installation

2. Printer Installation During Login Scripts

3. Command Line Scripted Printer Installations

4. Multiple Printer Installation

5. PRINTER INSTALLATION

6. Automation of ActiveX installation

7. Silent installation of WSH 5.6 ?

8. PostScript calendar creator: pcal -- installation problem

9. problem with ghostscript installation

10. /Unattended installation of GhostScript

11. Automatica network adapter installation

12. Executing an installation using script/Wise for Windows Installer

 

 
Powered by phpBB® Forum Software