My XPSP2 box says %clientnam% = console when I’m not in a terminal session so it is set but not the same as @wksta. When opening a terminal session to our corporate terminal server (MS Terminal server no Citrix) %clientname% is the same as my comp's name (on the term server local it is still console).

So this would do:

Code:

$ComputerName = "%computername%

If @wkstat = $ComputerName
?"No terminal client"
Else
?"Terminal client"
EndIf



Edited by Mart (2005-06-16 07:19 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.