Jump to Real's How-to Main page

Detect if user is using Terminal Server

[external function declaration]
FUNCTION Integer GetSystemMetrics (Integer nIndex) LIBRARY "user32.dll"


[powerscript]
integer SM_REMOTESESSION = 4096  // remote session
integer SM_REMOTECONTROL = 8193  // remote control

IF GetSystemMetrics(SM_REMOTESESSION)> 0 THEN
    // on terminal server
END IF

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]