Per­haps you know the prob­lem, you need to install new Print­ers for all your Users. But this can be really a pain, so here is a lit­tle .VBS script. This Script look in a text file con­tain­ing the UNC path of the Printer, for example:

\printserver1.domain.chprintername1
\printserver1.domain.chprintername2
\printserver2.domain.chprintername3

So you start the Script, it will install all Print­ers in the text file — end of story. There is also a Unin­stall Script included.

down­load the .VBS Scripts here
 
The install Script:

=================================================
Option Explicit

Dim WSHShell, fso, FileIn, File­Out
Dim Datei, Text, Txt, i, arrSort, arrTest(), oArgs
Dim objNet­work, strUNCPrinter

Set WSHShell = WScript.CreateObject(“WScript.Shell”)
Set fso = WScript.CreateObject(“Scripting.FileSystemObject”)

’ prüfen ob Datei existiert
’ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Datei = “Printer.txt”
If not fso.FileExists( Datei ) then
Msg­Box UCase( Datei ) & ” existiert nicht!” & vbCRLF & vbCRLF & ” … das ist das Ende.”, , WScript.ScriptName
WScript.Quit
End If

’ alle Zeilen lesen und an Array übergeben
’ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set FileIn = FSO.OpenTextFile(Datei, 1, true) ’ Datei zum Lesen öff­nen
i=0
Do While Not (FileIn.atEndOfStream) ’ wenn Datei nicht zu ende ist, weiter lesen
ReDim Pre­serve Zeile(i)
Zeile(i) = FileIn.Readline
i = i + 1
Loop

If i < 1 Then
ReDim Pre­serve Zeile(i)
Zeile(i) = “Leer­datei”
End If
FileIn.Close
Set FileIn = nothing

’ Drucker instal­lieren
’ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

for i = 0 to ubound( Zeile )
   
    strUNCPrinter=Zeile(i)
    Set objNet­work = CreateObject(“WScript.Network”)
    objNetwork.AddWindowsPrinterConnection strUNCPrinter
next
=================================================

and the unin­stall Script:

=================================================
Option Explicit

Dim WSHShell, fso, FileIn, File­Out
Dim Datei, Text, Txt, i, arrSort, arrTest(), oArgs
Dim objNet­work, strUNCPrinter, bForce, bUpdateProfile

Set WSHShell = WScript.CreateObject(“WScript.Shell”)
Set fso = WScript.CreateObject(“Scripting.FileSystemObject”)

’ prüfen ob Datei existiert
’ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Datei = “Printer.txt”
If not fso.FileExists( Datei ) then
Msg­Box UCase( Datei ) & ” existiert nicht!” & vbCRLF & vbCRLF & ” … das ist das Ende.”, , WScript.ScriptName
WScript.Quit
End If

’ alle Zeilen lesen und an Array übergeben
’ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set FileIn = FSO.OpenTextFile(Datei, 1, true) ’ Datei zum Lesen öff­nen
i=0
Do While Not (FileIn.atEndOfStream) ’ wenn Datei nicht zu ende ist, weiter lesen
ReDim Pre­serve Zeile(i)
Zeile(i) = FileIn.Readline
i = i + 1
Loop

If i < 1 Then
ReDim Pre­serve Zeile(i)
Zeile(i) = “Leer­datei”
End If
FileIn.Close
Set FileIn = nothing

’ Drucker instal­lieren
’ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

bForce = “True“
bUp­datePro­file = “False“
on Error Resume Next    ‘wenn Drucker nicht instal­liert ist

for i = 0 to ubound( Zeile )
   
    strUNCPrinter=Zeile(i)
    Set objNet­work = CreateObject(“WScript.Network”)
    objNetwork.RemovePrinterConnection strUNCPrinter, bForce, bUpdateProfile

next

=================================================