old situation:
printers are installed with a kix loginscript based on client computername.
 Code:
$computerprt = left (@wksta, 6)
select 
;Locatie 1
	case $computerprt = "LA-MAN"
		AddPrinterConnection ("\\printserver\printer1")
		SetDefaultPrinter("\\printserver\printer1")
;Locatie 2
	case $computerprt = "CA-DOC"
		AddPrinterConnection ("\\printserver\printer2")
		SetDefaultPrinter("\\printserver\printer2")
endselect


this works and i'm very happy with it.

But we are migrating some clients to XenDesktop 4(locked down), all these virtual clients have the same first 6 characters, only the number is different.
So my kix script isn't working anymore.

I found a little tool on the citrix website: http://support.citrix.com/article/CTX124963
this retrieves the original machines client name and puts them in the windows environment variable.

Now my question is how to let kix read this variable and use this to install the printers?(example above)

I hope my you can understand my question.(it's a bit messy)

thanks


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