Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Network printer deployment script

Reply
 
Old 12-19-2008   #1 (permalink)
Rahisuddin Shah


 
 

Network printer deployment script

Greetings,

I am going to consolidate 5 print server located at physically different
location into one print server.
I can use print migration utility to migrate queues from all 5 machine to
new single machine.
But I know one the old machine are shutdown client will not be able to print
unless we re-create network printer for them pointing to new print server.
For this purpose I am looking for VBScript and any better ideas. There are
1200 users spreading in 5 corner of the city.

I appreciate you time and effort.

regards

--
Rahisuddin Shah
MCSE - MCSA - ITIL



My System SpecsSystem Spec
Old 12-19-2008   #2 (permalink)
James Whitlow


 
 

Re: Network printer deployment script

"Rahisuddin Shah" <raisboss@xxxxxx> wrote in message
news:uURGu%23eYJHA.1528@xxxxxx
Quote:

> Greetings,
>
> I am going to consolidate 5 print server located at physically different
> location into one print server.
> I can use print migration utility to migrate queues from all 5 machine to
> new single machine.
> But I know one the old machine are shutdown client will not be able to
> print unless we re-create network printer for them pointing to new print
> server. For this purpose I am looking for VBScript and any better ideas.
> There are 1200 users spreading in 5 corner of the city.
You can use the 'WScript.Network' object to do this. See sample below.
Just add as many or as few items to the dictionary as you need. The script
would need to be run on each machine for each user. You can add it to your
login script or call it from your login script.

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set oWNT = CreateObject("WScript.Network")
Set oPrinters = CreateObject("Scripting.Dictionary")
oPrinters.CompareMode = 1 'Case Insensitive

oPrinters.Add "\\oldserver1\printer1", "\\newserver\printer1"
oPrinters.Add "\\oldserver1\printer2", "\\newserver\printer2"
oPrinters.Add "\\oldserver2\printer1", "\\newserver\printer3"

Set oConnections = oWNT.EnumPrinterConnections

For i = 1 to oConnections.Count - 1 Step 2
If oPrinters.Exists(oConnections(i)) Then
oWNT.RemovePrinterConnection oConnections(i), True
oWNT.AddWindowsPrinterConnection oPrinters(oConnections(i))
End If
Next
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Script to install a "HP 5Si Printer" as a local printer VB Script
Help with Deployment Workbench and Deployment Services Vista installation & setup
Inactive printer-checking script PowerShell
Shared Printer - Script Vista networking & sharing
Micrsoft Deployment and Vista image deployment.... Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46