ok thank you so much \:\)

i know i'm not good at it ;\)

where is the "xen" from if xen = true?

when i put all the code together is this correct?
 Code:
If xen = true
	$computerprt = "%XDClientName%"
Else
	$computerprt = Left(@wksta, 6)
EndIf

Select
		;Location 1
	Case $computerprt = "LA-MAN"
		AddPrinterConnection("\\printserver\printer1")
		SetDefaultPrinter("\\printserver\printer1")
		
		;Locatie 2
	Case $computerprt = "CA-DOC"
		AddPrinterConnection("\\printserver\printer2")
		SetDefaultPrinter("\\printserver\printer2")
EndSelect


Edited by Mart (2011-05-26 02:36 PM)
Edit Reason: Please use code tags when posting code.