Hi all,
I've been given a VBScript to amend to resolve a printer issue we have on site..
I'm missing something that's causing an error..
I believe its related to the "" on the printer remove lines.. Can anyone advise further?
I know it looks odd, but i need to remove an old printer setup and then refresh it, as such..
The script is:
' SET DEFAULT PRINTER SCRIPT
ON ERROR RESUME NEXT
dim oNetwork
Set oNetwork = WScript.CreateObject("WScript.Network")
' INSTALL PHOTOCOPIER AS NETWORK PRINTER
ONetwork.RemovePrinterConnection "\\bobs-server\ICTSUITE COPIER COLOUR"
ONetwork.RemovePrinterConnection "\\bobs-server\ICTCOPIER BLACK & WHITE"
ONetwork.AddWindowsPrinterConnection "\\bobs-server\ICTSUITE COPIER COLOUR"
ONetwork.AddWindowsPrinterConnection "\\bobs-server\ICTCOPIER BLACK & WHITE"
Select Case ucase(oNetwork.ComputerName)
CASE "SONY-VAIO"
ONetwork.SetDefaultPrinter "HP5940"
CASE ELSE
ONetwork.SetDefaultPrinter "\\bobs-SERVER\ICTCOPIER BLACK & WHITE"
End Select
WScript.Quit
' End of Script
Any feedback would be really appreciated as this is causing no end of bother at the moment..
Unfortunately, we are extremely limited on testing, so hopefully a correct script will do the job once corrected..
Thanks in advance all,
D..