We have got a new Print Server.
The printers are working fine on it.
I am trying to update the printers on client computers and don't want to do it manually. To accompolish this I am using a VBS however its not working from DS.
The VBS is as follows:
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set wn = WScript.CreateObject("WScript.Network")
Set ntsm = WScript.CreateObject("WScript.Shell")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Printer",,48)
For Each objItem in colItems
Dim printer, server
printer = objItem.ShareName
server = objItem.ServerName
If server Is "\\<Old Server>" Then
wn.RemovePrinterConnection "\\<Old Server>\" &printer
wn.AddWindowsPrinterConnection "\\<New Server>\" &printer, printer, True
End If
Next
If I run this script direclty going to the location, its working fine but if I create a job to run the script from DS it doesn't do anything. I get a green check mark indicating that it has successfully ran the script but nothing happens on the client.
DS 6.9 SP4 Client: Win XP Pro