Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Can anyone please tell me what's wrong with this.

' VBScript.

 

Dim net

Set net = CreateObject("WScript.Network")

 

net.AddWindowsPrinterConnection "\\server\ICTSUITECOL"

 

net.AddWindowsPrinterConnection "\\server\ICTSuiteBW"

 

net.SetDefaultPrinter "\\server\ICTSuiteBW"

 

net.AddWindowsPrinterConnection "\\server\UPWEST"

 

i know jack about VBS and this script was written by my predecessor. as far as i can make out it's never worked. it sits in GPO under 'scripts to run at logon' see below for the error message.

 

its doing my head in!!!

Posted

'add a printer but do not make it the default.

 

Set wshNetwork = CreateObject("WScript.Network")

wshNetwork.AddWindowsPrinterConnection "\\servername\printername"

 

'add another printerand make it the default.

 

wshNetwork.AddWindowsPrinterConnection "\\servername\printername"

wshNetWork.SetDefaultPrinter "\\servername\printername"

  • Thanks 1
Posted
'add a printer but do not make it the default.

 

Set wshNetwork = CreateObject("WScript.Network")

wshNetwork.AddWindowsPrinterConnection "\\servername\printername"

 

'add another printerand make it the default.

 

wshNetwork.AddWindowsPrinterConnection "\\servername\printername"

wshNetWork.SetDefaultPrinter "\\servername\printername"

 

thanks ICT_GUY very much appreciated.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...