Welcome to KORG!

You can try this:
 Code:
; Determine login type - direct, Terminal Server, or Citrix
; Con=Direct Console, RDP=Terminal Server, or ICA=Citrix
$ConnType = Left(%SESSIONNAME%, 3)

Just use a Select/Case to decide what to do based on the content of $ConnType.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D