Jump to content

Recommended Posts

Posted

are you using vbscript or something ? maybe vba ?

and would you have a select case ?

 

if so you need to add the end statment to it.

 

i might be on a totally different track , sorry if i have misunderstood what you mean.

Posted

The error is caused by the second Select Case (Left(computerName, 5)). If you get rid of this it should work (as it is identical to the first). E.g.

 

Select Case (Left(computerName, 5))

Case "W107A"
	
	WshNetwork.AddWindowsPrinterConnection "\\servername\W107A_in"

Case "W107c"

	WshNetwork.AddWindowsPrinterConnection "\\servername\W107c_in"

Case Else
	' WScript.Echo "No default printers added"

End Select

 

Iain.

Posted

I have a similar script that removes printers and then adds new ones based on location (taken from the computers container OU) works a treat here.

 

PM me if you'd like to see it, made with a lot of help from the edugeek folks :)

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...