What do you mean by "local"? On a Terminal Server(TS), the script runs "locally" on the TS so as far as the script is concerned the TS is local.

I suspect however that you mean the "remote" client.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.