To subvert the script for a TS logon, you could simply set an environment var on the TS and check for it in the script. No need to get fancy.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.