The code below is an example. It only has two locations but this can obviously be expanded.

It checks if the user is in an ICA session, if yes it should run XD4ClientName.exe and translate %XDClientName% variable into a kix style variable. It check the first two characters of the client name and can run whatever is needed when a case statements is true. It requires the SessionType UDF I linked to earlier.

 Code:
Break on

$sessiontype = SessionType()

If $sessiontype = "ICA"
	;Run XD4ClientName.exe here.
	$clientname = ExpandEnvironmentVars(%XDClientName%)
	Select
		Case Left($clientname, 2) = "LA"
			;Do LA stuff
		Case Left($clientname, 2) = "CA"
			;Do CA stuff
	EndSelect
EndIf
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.