A bit late but I was unable to reply yesterday afternoon.

The code below should do the trick. It assumes that the xd4cleintname application has already run from your batch file so the xdcleintname environment variable is filled with the client name.
It checks if the server name contains VA-CTX-DDC and sets the $xen variable to Yes or No. As far as I understand this is the only server clients connect to. It leaves out the 1 at the end to provide some flexibility when adding another server. If $xen is yes it gets the client name from the xdclientmane environment variable and checks the first 6 characters. If they match whatever you specify (the aaaaaa, bbbbbb, cccccc strings) it executes the code placed below the check. If $xen is anything else but Yes it can execute some other code if needed. This is an example to show the concept. The client name check needs to be modified to match the client names you use.

 Code:
If InStr(@WKSTA, "va-ctx-ddc")
	$xen = "Yes"
Else
	$xen = "No"
EndIf

If $xen = "Yes"
	$clientname = ExpandEnvironmentVars(%XDClientName%)
	Select
		Case Left($clientname, 6) = "aaaaaa"
			;Add code for aaaaaa systems here.
		Case Left($clientname, 6) = "bbbbbb"
			;Add code for bbbbbb systems here.
		Case Left($clientname, 6) = "cccccc"
			;Add code for cccccc systems here.
	EndSelect
Else
	;Place code for non xen sessions here if needed.
	;You can remove the Else section if nothing is needed for non xen sessions.
EndIf
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.