Basically, there are two ways to get a clientโs name / address:
- Use MFCOM, namely the
MetaFrameSession object. - Using WMI, the
MetaFrame_ICA_Client class in root\Citrix looks promising.
The drawback of the mayor of both solutions is that they require more user rights than you could give. From what I read, at least the โView Accountโ permissions are required in Citrix, but I have no way to check it right now. I could not get myself to work as a regular user.
To give you an idea, accessing information with MFCOM would look something like this:
var MetaFrameSessionObject = 6; var oShell = new ActiveXObject("WScript.Shell"); var oSession = new ActiveXObject("MetaFrameCOM.MetaFrameSession"); oSession.Initialize( MetaFrameSessionObject, oShell.ExpandEnvironmentStrings("%COMPUTERNAME%"), oShell.ExpandEnvironmentStrings("%SESSIONNAME%"), -1 ); alert(oSession.ClientAddress);
Tomalak
source share