You can change the name of the variable to whatever you need.
If the variable name is %SRV% and it exist when you are on a citrix session then this should work.

 Code:
; Exit immediatly if SRV is not null
If '%SRV%' Quit 0 EndIf
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.