I'm moving our printers off the old file server and onto a new print
server appliance. I'm using the scripts from this page:

http://www.microsoft.com/technet/scriptcenter/scripts/printing/client/default.mspx

The problem is that I want it to delete all printer connections coming
from \\serverA. And create new ones to shares on serverB. I don't
mind having to specify in each script which printers to add, but I
don't want to assume to know which printers the computers currently
have installed. I just want to delete ALL connections to the old
server.

This is the script I have now, but it has to be set up knowing which
printer is currently installed. And worse yet, after it runs once, the
printer is deleted. Then when you run it again (at login) it gives you
an error because it can't find the connection. If I could just remove
the error from being displayed, then I could just list ALL of the
printers from the old print server in the script and that would cover
me.



Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.RemovePrinterConnection "\\serverA\printer01"


Set WshNetwork = CreateObject("WScript.Network")

WshNetwork.AddWindowsPrinterConnection "\\serverB\printer01"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printer03"
WshNetwork.SetDefaultPrinter "\\serverB\printer03"

Re: Removing and adding printers by JHP

JHP
Wed Apr 12 12:06:18 CDT 2006

Option Explicit

Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
Const ForceRemove = True
Const UpdateProfile = True

strComputer ="."
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
Set objWSH = WScript.CreateObject("WScript.Network")

On Error Resume Next

For Each rtnPrinter In objPrinter
If rtnPrinter.PrinterStatus = 3 Then
objWSH.RemovePrinterConnection rtnPrinter.DeviceID, ForceRemove,
UpdateProfile
End If
Next
Set objWSH = Nothing
Set objPrinter = Nothing
Set objWMI = Nothing

<bjriffel@hotmail.com> wrote in message
news:1144857441.759103.327070@z34g2000cwc.googlegroups.com...
> I'm moving our printers off the old file server and onto a new print
> server appliance. I'm using the scripts from this page:
>
> http://www.microsoft.com/technet/scriptcenter/scripts/printing/client/default.mspx
>
> The problem is that I want it to delete all printer connections coming
> from \\serverA. And create new ones to shares on serverB. I don't
> mind having to specify in each script which printers to add, but I
> don't want to assume to know which printers the computers currently
> have installed. I just want to delete ALL connections to the old
> server.
>
> This is the script I have now, but it has to be set up knowing which
> printer is currently installed. And worse yet, after it runs once, the
> printer is deleted. Then when you run it again (at login) it gives you
> an error because it can't find the connection. If I could just remove
> the error from being displayed, then I could just list ALL of the
> printers from the old print server in the script and that would cover
> me.
>
>
>
> Set objNetwork = WScript.CreateObject("WScript.Network")
> objNetwork.RemovePrinterConnection "\\serverA\printer01"
>
>
> Set WshNetwork = CreateObject("WScript.Network")
>
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printer01"
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printer03"
> WshNetwork.SetDefaultPrinter "\\serverB\printer03"
>



Re: Removing and adding printers by maximillianx

maximillianx
Wed Apr 12 14:00:12 CDT 2006

OP stated he wanted to delete all printers from serverA - this script will
remove all printers regardless of where they are served from.

I modified your code slightly (see the IF statement) - That hopefully should
work as well

Option Explicit

Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
Const ForceRemove = True
Const UpdateProfile = True

strComputer ="."
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
Set objWSH = WScript.CreateObject("WScript.Network")

On Error Resume Next

For Each rtnPrinter In objPrinter
If rtnPrinter.PrinterStatus = 3 and instr(rtnPrinter.DeviceID,"\\serverA")
Then
'show the deviceID we are about to remove
msgbox rtnPrinter.DeviceID

objWSH.RemovePrinterConnection rtnPrinter.DeviceID, ForceRemove,
UpdateProfile
End If
Next

Set objWSH = Nothing
Set objPrinter = Nothing
Set objWMI = Nothing


"JHP" <goawayspam@GFY.com> wrote in message
news:Oa%23kPNlXGHA.4144@TK2MSFTNGP04.phx.gbl...
> Option Explicit
>
> Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
> Const ForceRemove = True
> Const UpdateProfile = True
>
> strComputer ="."
> Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
> Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
> Set objWSH = WScript.CreateObject("WScript.Network")
>
> On Error Resume Next
>
> For Each rtnPrinter In objPrinter
> If rtnPrinter.PrinterStatus = 3 Then
> objWSH.RemovePrinterConnection rtnPrinter.DeviceID, ForceRemove,
> UpdateProfile
> End If
> Next
> Set objWSH = Nothing
> Set objPrinter = Nothing
> Set objWMI = Nothing
>
> <bjriffel@hotmail.com> wrote in message
> news:1144857441.759103.327070@z34g2000cwc.googlegroups.com...
>> I'm moving our printers off the old file server and onto a new print
>> server appliance. I'm using the scripts from this page:
>>
>> http://www.microsoft.com/technet/scriptcenter/scripts/printing/client/default.mspx
>>
>> The problem is that I want it to delete all printer connections coming
>> from \\serverA. And create new ones to shares on serverB. I don't
>> mind having to specify in each script which printers to add, but I
>> don't want to assume to know which printers the computers currently
>> have installed. I just want to delete ALL connections to the old
>> server.
>>
>> This is the script I have now, but it has to be set up knowing which
>> printer is currently installed. And worse yet, after it runs once, the
>> printer is deleted. Then when you run it again (at login) it gives you
>> an error because it can't find the connection. If I could just remove
>> the error from being displayed, then I could just list ALL of the
>> printers from the old print server in the script and that would cover
>> me.
>>
>>
>>
>> Set objNetwork = WScript.CreateObject("WScript.Network")
>> objNetwork.RemovePrinterConnection "\\serverA\printer01"
>>
>>
>> Set WshNetwork = CreateObject("WScript.Network")
>>
>> WshNetwork.AddWindowsPrinterConnection "\\serverB\printer01"
>> WshNetwork.AddWindowsPrinterConnection "\\serverB\printer03"
>> WshNetwork.SetDefaultPrinter "\\serverB\printer03"
>>
>
>



Re: Removing and adding printers by JHP

JHP
Wed Apr 12 14:42:09 CDT 2006

Nice!

"maximillianx" <u1p2p3h4o5l6d72001@hotmail.com> wrote in message
news:efL%23UNmXGHA.1352@TK2MSFTNGP05.phx.gbl...
> OP stated he wanted to delete all printers from serverA - this script will
> remove all printers regardless of where they are served from.
>
> I modified your code slightly (see the IF statement) - That hopefully
> should work as well
>
> Option Explicit
>
> Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
> Const ForceRemove = True
> Const UpdateProfile = True
>
> strComputer ="."
> Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
> Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
> Set objWSH = WScript.CreateObject("WScript.Network")
>
> On Error Resume Next
>
> For Each rtnPrinter In objPrinter
> If rtnPrinter.PrinterStatus = 3 and instr(rtnPrinter.DeviceID,"\\serverA")
> Then
> 'show the deviceID we are about to remove
> msgbox rtnPrinter.DeviceID
>
> objWSH.RemovePrinterConnection rtnPrinter.DeviceID, ForceRemove,
> UpdateProfile
> End If
> Next
>
> Set objWSH = Nothing
> Set objPrinter = Nothing
> Set objWMI = Nothing
>
>
> "JHP" <goawayspam@GFY.com> wrote in message
> news:Oa%23kPNlXGHA.4144@TK2MSFTNGP04.phx.gbl...
>> Option Explicit
>>
>> Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
>> Const ForceRemove = True
>> Const UpdateProfile = True
>>
>> strComputer ="."
>> Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
>> Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
>> Set objWSH = WScript.CreateObject("WScript.Network")
>>
>> On Error Resume Next
>>
>> For Each rtnPrinter In objPrinter
>> If rtnPrinter.PrinterStatus = 3 Then
>> objWSH.RemovePrinterConnection rtnPrinter.DeviceID, ForceRemove,
>> UpdateProfile
>> End If
>> Next
>> Set objWSH = Nothing
>> Set objPrinter = Nothing
>> Set objWMI = Nothing
>>
>> <bjriffel@hotmail.com> wrote in message
>> news:1144857441.759103.327070@z34g2000cwc.googlegroups.com...
>>> I'm moving our printers off the old file server and onto a new print
>>> server appliance. I'm using the scripts from this page:
>>>
>>> http://www.microsoft.com/technet/scriptcenter/scripts/printing/client/default.mspx
>>>
>>> The problem is that I want it to delete all printer connections coming
>>> from \\serverA. And create new ones to shares on serverB. I don't
>>> mind having to specify in each script which printers to add, but I
>>> don't want to assume to know which printers the computers currently
>>> have installed. I just want to delete ALL connections to the old
>>> server.
>>>
>>> This is the script I have now, but it has to be set up knowing which
>>> printer is currently installed. And worse yet, after it runs once, the
>>> printer is deleted. Then when you run it again (at login) it gives you
>>> an error because it can't find the connection. If I could just remove
>>> the error from being displayed, then I could just list ALL of the
>>> printers from the old print server in the script and that would cover
>>> me.
>>>
>>>
>>>
>>> Set objNetwork = WScript.CreateObject("WScript.Network")
>>> objNetwork.RemovePrinterConnection "\\serverA\printer01"
>>>
>>>
>>> Set WshNetwork = CreateObject("WScript.Network")
>>>
>>> WshNetwork.AddWindowsPrinterConnection "\\serverB\printer01"
>>> WshNetwork.AddWindowsPrinterConnection "\\serverB\printer03"
>>> WshNetwork.SetDefaultPrinter "\\serverB\printer03"
>>>
>>
>>
>
>



Re: Removing and adding printers by bjriffel

bjriffel
Wed Apr 12 15:42:40 CDT 2006

That looks great, but when put that into a blank text file test.vbs and
run it, I get this error:

http://img147.imageshack.us/img147/6834/vbscripterror5sm.jpg


Re: Removing and adding printers by maximillianx

maximillianx
Wed Apr 12 15:59:59 CDT 2006

You have to compensate for word-wrap...

Rob


-----

Option Explicit

Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
Const ForceRemove = True
Const UpdateProfile = True

strComputer ="."
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
Set objWSH = WScript.CreateObject("WScript.Network")

On Error Resume Next

For Each rtnPrinter In objPrinter
If rtnPrinter.PrinterStatus = 3 and instr(rtnPrinter.DeviceID, _
"\\serverA") Then
'show the deviceID we are about to remove
msgbox rtnPrinter.DeviceID

objWSH.RemovePrinterConnection _
rtnPrinter.DeviceID, ForceRemove, UpdateProfile
End If
Next

Set objWSH = Nothing
Set objPrinter = Nothing
Set objWMI = Nothing

----

<bjriffel@hotmail.com> wrote in message
news:1144874560.447052.325980@z34g2000cwc.googlegroups.com...
> That looks great, but when put that into a blank text file test.vbs and
> run it, I get this error:
>
> http://img147.imageshack.us/img147/6834/vbscripterror5sm.jpg
>



Re: Removing and adding printers by bjriffel

bjriffel
Wed Apr 12 16:42:15 CDT 2006

Oh JEEZ, sorry. That works GREAT!!! I took out the line

msgbox rtnPrinter.DeviceID

And I added my add printers script to the end of it and it works
PERFECT!!!

My next questions is, how can I keep this from running every time they
start up? I've been reading about creating registry keys, but havn't
got that to work yet. Then I'd have to have an If Then statement
checking for the key and ending if it existed or had the correct data
in the key.


Re: Removing and adding printers by bjriffel

bjriffel
Wed Apr 12 16:54:00 CDT 2006

Ok, not so perfectly. I added the folowing lines to the end, thinking
they would just run after the previous script

Set WshNetwork = CreateObject("WScript.Network")

WshNetwork.AddWindowsPrinterConnection "\\serverB\printera01"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printera05"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printerb01"
WshNetwork.SetDefaultPrinter "\\serverB\printera03"

Which if in a seperate .vbs file, runs just fine. It just won't work
at the end of the script, most likely because I'm an illiterate VB
Scripter!!! But you guys are my saviors!!!!


Re: Removing and adding printers by bjriffel

bjriffel
Wed Apr 12 17:00:37 CDT 2006

So I've been poking around on the TechNet scripts page and came up with
these.

This one lists the printer connections:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")

Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")

For Each objPrinter in colInstalledPrinters
Wscript.Echo "Name: " & objPrinter.Name
Wscript.Echo "Location: " & objPrinter.Location
Wscript.Echo "Default: " & objPrinter.Default
Next

The problem is, it lists them to a popup window. If it listed them to
a text file, I could then add a couple lines to then delete any of them
that are \\serverA printers.

I found another script that just deletes all printers. This would be
fine, but some users have local printers installed.

My last problem is, I don't want this script to have to run EVERY time
they restart. So I need it to check for a registry key, then run the
script, then create the key.

Of course I say I need to do all of these things, but I have NO
scripting skills. I only have what I've read and pieced together.


Re: Removing and adding printers by maximillianx

maximillianx
Wed Apr 12 16:58:41 CDT 2006

I don't know if you need to worry about it - I would have it run
continuously until you are sure no one is connecting any longer to the old
server. Because really, If they have no printers on the old server, the
script should just skip the printer delete command and then exit out without
any incident. No harm done - and there's not a lot of code to process, so
it won't kill your slower connections either.

You might want to put an 'on error resume next' in there if you don't want
to worry about handling errors, but don't want them popping up on the screen
either...

Good luck!
Rob


<bjriffel@hotmail.com> wrote in message
news:1144878135.161784.91700@j33g2000cwa.googlegroups.com...
> Oh JEEZ, sorry. That works GREAT!!! I took out the line
>
> msgbox rtnPrinter.DeviceID
>
> And I added my add printers script to the end of it and it works
> PERFECT!!!
>
> My next questions is, how can I keep this from running every time they
> start up? I've been reading about creating registry keys, but havn't
> got that to work yet. Then I'd have to have an If Then statement
> checking for the key and ending if it existed or had the correct data
> in the key.
>



Re: Removing and adding printers by maximillianx

maximillianx
Wed Apr 12 17:02:27 CDT 2006

Place those lines right before:

Set objWSH = Nothing
Set objPrinter = Nothing
Set objWMI = Nothing

Then they should go :)

Rob

<bjriffel@hotmail.com> wrote in message
news:1144878840.518917.132500@j33g2000cwa.googlegroups.com...
> Ok, not so perfectly. I added the folowing lines to the end, thinking
> they would just run after the previous script
>
> Set WshNetwork = CreateObject("WScript.Network")
>
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printera01"
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printera05"
> WshNetwork.AddWindowsPrinterConnection "\\serverB\printerb01"
> WshNetwork.SetDefaultPrinter "\\serverB\printera03"
>
> Which if in a seperate .vbs file, runs just fine. It just won't work
> at the end of the script, most likely because I'm an illiterate VB
> Scripter!!! But you guys are my saviors!!!!
>



Re: Removing and adding printers by maximillianx

maximillianx
Wed Apr 12 17:05:32 CDT 2006

Seriously, you need to check out my script here:

http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=212&posts=1&start=1

really... :)

Rob

<bjriffel@hotmail.com> wrote in message
news:1144874188.898046.189270@v46g2000cwv.googlegroups.com...
> So I've been poking around on the TechNet scripts page and came up with
> these.
>
> This one lists the printer connections:
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & strComputer &
> "\root\cimv2")
>
> Set colInstalledPrinters = objWMIService.ExecQuery _
> ("Select * from Win32_Printer")
>
> For Each objPrinter in colInstalledPrinters
> Wscript.Echo "Name: " & objPrinter.Name
> Wscript.Echo "Location: " & objPrinter.Location
> Wscript.Echo "Default: " & objPrinter.Default
> Next
>
> The problem is, it lists them to a popup window. If it listed them to
> a text file, I could then add a couple lines to then delete any of them
> that are \\serverA printers.
>
> I found another script that just deletes all printers. This would be
> fine, but some users have local printers installed.
>
> My last problem is, I don't want this script to have to run EVERY time
> they restart. So I need it to check for a registry key, then run the
> script, then create the key.
>
> Of course I say I need to do all of these things, but I have NO
> scripting skills. I only have what I've read and pieced together.
>



Re: Removing and adding printers by hooplatechtips

hooplatechtips
Wed Apr 12 21:17:14 CDT 2006

My post from 5:00 PM was kind of a strange fluke post that I tried to
post earlier in the day. The script you gave me works great! The only
problem is with the stuff I added in to add the printers. Tried
putting it at the top, which caused lots of problems, and I even put:

msgbox Printer 1
msgbox Printer 2

etc. between the printer addition lines to make sure they were running,
and the message boxes popped up like normal, but it didn't add the
printers.

I just don't understand why this code won't run.

Set WshNetwork = CreateObject("WScript.Network")

WshNetwork.AddWindowsPrinterConnection "\\serverB\printera01"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printera05"
WshNetwork.AddWindowsPrinterConnection "\\serverB\printerb01"
WshNetwork.SetDefaultPrinter "\\serverB\printera03"

Is it something to do with the first line (which I'm assume is the
declaration of variables. Does that line need to go at the very top?


Re: Removing and adding printers by bjriffel

bjriffel
Tue Apr 18 15:36:19 CDT 2006

Ok, I guess I didn't think this through all the way. We want these
printers to be computer specific. We have some users that travel to
our other locations and we don't want their printers following them.
If I add these scripts to a GPO for the computer then it will be a
"startup script". This is a problem because there wouldn't be any
credentials to use to connect to the print shares. Alternately, I
can't make it a shutdown script either because it logs off before it
runs it.

I really don't want to embed my administrative password into the
script. I'm probably just overlooking the obvious, but I don't know.

The last question I have is, how can I make this script only run once?
I know that it shouldn't matter because the scripts run pretty fast
anyway, but I'd still like to know how to do it for future references.

Thank you soooo much!


Re: Removing and adding printers by YostNetSolutions

YostNetSolutions
Sun Jul 16 23:12:01 CDT 2006

Ok, I know I am not a scripter or anything but I have been trying to remove
all the printers, both local and Network, and then add new network printers.
I have been trying to get the following three scripts to work:

I have DELETE_NET_PRINTER.vbs as:
-----------------------------------------------------------------------------------------
Option Explicit

Dim oWSHNetwork, oPrinters, intCounter

'-- Setting objects --
Set oWshNetwork = WScript.CreateObject("WScript.Network")
Set oPrinters = oWshNetwork.EnumPrinterConnections

For intCounter =1 to oPrinters.Count -1 Step 2
If Left (oPrinters(intCounter),2) = "\\" Then
oWSHNetwork.RemovePrinterConnection oPrinters.Item(intCounter),
true, true
End If

'oPrinters.Item(intCounter), true, true
Next

'Clean up and exit the script
Set oWSHNetwork = Nothing
Set oPrinters = Nothing
wscript.quit
------------------------------------------------------------------------------------------------

The DELETE_LOCAL_PRINTER.VBS is:
------------------------------------------------------------------------------------------------

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")

For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
------------------------------------------------------------------------------------------------

and the ADD_NEW_NETWORK_PTR.VBS is:
------------------------------------------------------------------------------------------------

Dim WSHNetwork

Set WSHNetwork = CreateObject("WScript.Network")

WSHNetwork.AddWindowsPrinterConnection "\\PrintServer\Printer1"
WSHNetwork.AddWindowsPrinterConnection "\\PrintServer\Printer2"

WSHNetwork.SetDefaultPrinter "\\PrintServer\Printer2"
------------------------------------------------------------------------------------------------

From this post I have gotten: (remove wordwrap on line 16 to17)
-----------------------------------------------------------------------------------------------
Option Explicit

Dim strComputer, objWMI, objPrinter, objWSH, rtnPrinter
Const ForceRemove = True
Const UpdateProfile = True

strComputer ="."
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set objPrinter = objWMI.ExecQuery("SELECT * FROM Win32_Printer")
Set objWSH = WScript.CreateObject("WScript.Network")

On Error Resume Next

For Each rtnPrinter In objPrinter
If rtnPrinter.PrinterStatus = 3 Then
objWSH.RemovePrinterConnection rtnPrinter.DeviceID, ForceRemove,
UpdateProfile
End If
Next

Dim WSHNetwork

Set WSHNetwork = CreateObject("WScript.Network")

WSHNetwork.AddWindowsPrinterConnection "\\PrintServer\Printer1"
WSHNetwork.AddWindowsPrinterConnection "\\PrintServer\Printer2"

WSHNetwork.SetDefaultPrinter "\\PrintServer\Printer2"


Set objWSH = Nothing
Set objPrinter = Nothing
Set objWMI = Nothing

-----------------------------------------------------------------------------------------------

Will this script remove all the local, network, and add the correct
connections? I know it is all just thrown all in there, is there a better
way?

Thanks!

"maximillianx" wrote:

> Place those lines right before:
>
> Set objWSH = Nothing
> Set objPrinter = Nothing
> Set objWMI = Nothing
>
> Then they should go :)
>
> Rob
>
> <bjriffel@hotmail.com> wrote in message
> news:1144878840.518917.132500@j33g2000cwa.googlegroups.com...
> > Ok, not so perfectly. I added the folowing lines to the end, thinking
> > they would just run after the previous script
> >
> > Set WshNetwork = CreateObject("WScript.Network")
> >
> > WshNetwork.AddWindowsPrinterConnection "\\serverB\printera01"
> > WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
> > WshNetwork.AddWindowsPrinterConnection "\\serverB\printera03"
> > WshNetwork.AddWindowsPrinterConnection "\\serverB\printera05"
> > WshNetwork.AddWindowsPrinterConnection "\\serverB\printerb01"
> > WshNetwork.SetDefaultPrinter "\\serverB\printera03"
> >
> > Which if in a seperate .vbs file, runs just fine. It just won't work
> > at the end of the script, most likely because I'm an illiterate VB
> > Scripter!!! But you guys are my saviors!!!!
> >
>
>
>