Hi Lan Man,Perhaps you could look for the Shortcut file that Citrix puts on the system. If found take appropriate action.
Here is some code for finding Terminal Server and Citrix, but not to exclude them.
You could also search the Registry of the Citrix client and try to find a key that
Windows 2000 TS does not have.
code:
$NTSERVER = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions", "ProductType")
$TERMSERVER = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions","ProductSuite")
$LTRIX = EXISTKEY("HKEY_LOCAL_MACHINE\SOFTWARE\Citrix")
$CTRIX = EXISTKEY("HKEY_CURRENT_USER\Software\Citrix")IF @INWIN = 1
IF ($NTSERVER<>"WinNT") AND (@DOS="5.0") AND ($TERMSERVER= "Enterprise|Terminal Server|")
; System is Windows 2000 Terminal Server
? "Found Terminal Server"
? "ERROR @ERROR: @SERROR"
; Quit or perform other task
ELSE
? "Unable to locate Terminal Server"
? "ERROR @ERROR: @SERROR"
; Quit or perform other task
ENDIF
ENDIF
IF ($LTRIX = 0) OR ($CTRIX = 0)
; The key was found
? "The Citrix Client was found on this system"
ELSE
; The key was not found
? "Unable to locate the Citrix Client"
ENDIF
NTDOC