<< Click to Display Table of Contents >> Navigation: 3. Script Language > OS and Software > OS and Software Operations |
MiniRobotLanguage (MRL)
GSD. Command
Get Session Data (name and Info)
Intention
This command will get information about running OS Sessions. It may be of use especially for Windows Terminal servers. GSD. can return the number of sessions, as well as the name and state of a specified session ID.
GSD. may return one of these states for a given session ID:
0 - User logged on to WinStation
1 - WinStation connected to client
2 - In the process of connecting to client
3 - Shadowing another WinStation
4 - WinStation logged on without client
5 - Waiting for client to connect
6 - WinStation is listening for connection
7 - WinStation is being reset
8 - WinStation is down due to error
9 - WinStation in initialization
There are four way to use GSD.
1. GSD. without any parameter will place two values on TOS:
- the session identifier of the current physical console session on TOS.
- the number of sessions below TOS. Example:
GSD.
DBP.$$000
DBP.$$000
will return:under Windows XP (run from Editor)
0 - current Session ID
1 - total sessions on this machine
will return:under Vista and higher, for example (run from Editor):
1 - current Session ID
1 - total sessions on this machine
2. GSD. with one parameter, like this: GSD.$$NUM
will return the session number in the given variable. Example:
GSD.$$NUM
DBP.$$NUM
3. GSD. with two parameters. Like this:
GSD.session ID|$$RET
will return the run-state of the session with the given session id. Example:
GSD.0|$$RST
DBP.$$RST
4.GSD. with 3 parameters, like this:
GSD.session ID|$$RET|$$NAM
Will return the run-state as well as the session name of the session with the given session ID.
Syntax
GSD.[P1][|P2][|P3]
Parameter Explanation
P1 - (optional) - Session ID, if omitted the Session ID for the current session is
been evaluted and placed on TOS. See examples above.
GSD. may return one of these states for a given session ID:
0 - User logged on to WinStation
1 - WinStation connected to client
2 - In the process of connecting to client
3 - Shadowing another WinStation
4 - WinStation logged on without client
5 - Waiting for client to connect
6 - WinStation is listening for connection
7 - WinStation is being reset
8 - WinStation is down due to error
9 - WinStation in initialization
P2 - (optional) - Variable for Result. For Details see examples above.
P3 - (optional) - Variable for Result. For Details see examples above.
Example
'
GSD.
DBP.$$000
END.
Remarks
-
Limitations:
-
See also: