更新时间:2022-06-23 22:21:59
基本上,有两种方法可以想到客户名称/地址:
Basically, there are two possibilities to get hold of the client name/address that come to mind:
MetaFrameSession
对象。 root\Citrix
中的 MetaFrame_ICA_Client
类看起来很有希望。MetaFrameSession
object.MetaFrame_ICA_Client
class in root\Citrix
looks promising.这两种解决方案的市长缺点是,它们需要的用户权限超出了您可能愿意提供的权限。根据我的阅读,Citrix至少需要帐户查看权限,但是我目前无法对其进行测试。我不能以普通用户的身份工作。
Mayor drawback of both solutions is, that they require more user permissions than you might be willing to give. From what I read, at least "Account View" permissions are required within Citrix, but I have no way to test it right now. I could not get either to work as a normal user.
为了给您一个想法,使用MFCOM访问信息看起来像这样:
To give you an idea, accessing the info 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);