ChangePrintServer.vbs

‘ Endre Printer kø thsrv06 – Windows logon script
‘ Author ktb@netpower.no
‘ Version 1 – April 22th 2010
‘ ——————————————————‘
Option Explicit
On Error Resume Next

Dim objNetwork, strUNCPrinter
strUNCPrinter = «\\thsrv06\FTP1_Ricoh_SH»

Set objNetwork = CreateObject(«WScript.Network»)

‘ Seksjon for fjerning av printer
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000bw_»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000bw»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000c_»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000c»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000draw_»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000draw»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc4000lanfax»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc3500bw»
objNetwork.RemovePrinterConnection «\\thsrv06\Rmpc3500draw»
objNetwork.RemovePrinterConnection «\\thsrv06\DSC224c»
objNetwork.RemovePrinterConnection «\\thsrv06\DSC224»

‘ Seksjon for opprettelse av nye printere
objNetwork.AddWindowsPrinterConnection «\\thsrv06\FTP1_Ricoh_Farge»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\FTP1_Ricoh_SH»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\FTP1_Ricoh_Tegne»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\FTP1_Res_Ricoh_Farge»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\FTP1_Res_Ricoh_SH»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\FTP1_Res_Ricoh_Tegne»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\Rmpc4000lanfax»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\BrotherTavle»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\R2032fax»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\Ricoh2032»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\hpDjT610»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\RicohSPC232SF»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\Rmpc3500bw»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\Rmpc3500c»
objNetwork.AddWindowsPrinterConnection «\\thsrv06\Rmpc3500draw»

‘ Setter standard printer
objNetwork.SetDefaultPrinter strUNCPrinter

Wscript.Quit

Tags: , ,
This site is protected by WP-CopyRightPro