Another method is to not run login scripts or portions of them from Terminal Servers.
code:
 

If @wksta="TERMA" OR
@wksta="TERMB"

Exit

EndIf