There are many way to do it, and your environment will determine what is best for you.

As the guys have suggested, it is worth searching the board and looking at previous discussions as these may highlight idiosyncracies that you should be aware of.

A simple check that I used to use in a mixed environment was:
 Code:
$sSessionType=Split(%SESSIONNAME%,"-")[0]
Select
Case $sSessionType="RDP"
	"Processing for a Terminal Services type connection..."+@CRLF
Case $sSessionType="ICA"
	"Processing for a Citrix type connection..."+@CRLF
Case $sSessionType="Console"
	"Processing for a local Console login on a multiuser operating system..."+@CRLF
Case "Default"
	"Processing for an unsupported or non-multiuser login..."+@CRLF
EndSelect