|
|
|||||||
Hey Guys...Im trying to take some sample vbscript for the MFCOM (MetaFrame COM) object and turn them into kix. Any assistance would be appreciated. Im having trouble on the initialization portion for some reason. Its probably just some syntax thing on my end. Here is one of the VBScript samples... Code: <package> And here is a short script I am trying to write to get the users IP address... Code: $ctxfarm = CreateObject("MetaFrameCOM.MetaFrameFarm") I keep getting a Type Mismatch error when I try to do the .initialize. Any ideas? |
||||||||
|
|
|||||||
Ahhh...Well after looking at some other type mismatch posts on here it seems I probably need to somehow find the numeric value for the initialization type. |
||||||||
|
|
|||||||
OK...Atleast found the value for the Farm enumeration, so this works to get all kinds of client info whe loggin into a citrix server. Code: $ctxfarm = CreateObject("MetaFrameCOM.MetaFrameFarm") Have also found problems with it working for non-admin users though so it may be useless. |
||||||||
|
|
|||||||
Shane (or anyone), I like your MFCOM-to-KIX code here. I'd like to implement so I can use in a login script to determine if a user has multiple sessions running. It works great but only for Admins (as you'd noted in the previous post). Just wondering if you ever got around the Admin limitation for MFCOM?!? Thanks for any help. Steve |
||||||||
|
|
|||||||
umm as far as i know it was a limitation in the mfcom itself. I have not tried anything using the newest version of 'presentation server 3.0' though. maybe they fixed it. something worth looking into atleast. |
||||||||
|
|
|||||||
Hi guys As MPS3.0 is now the standard for Metaframe implementation you can grant the Citrix Administrative Rights to a User Group without having them the right to open the CMC and change settings. Especially you can grant them the only one needed right "View Session Information" which doesn't affect your security at this point. This permission allows you to run such scripts and enumerate the session information. Below my little version to enumerate the Clientlocation written in WSH: Function funcLocationCheck() 'On Error Resume Next Set oMFFarm = CreateObject("MetaFrameCOM.MetaFrameFarm") ' Initialize the farm object. oMFFarm.Initialize 1 For Each oICASession In oMFFarm.Sessions If oICASession.UserName = sUser Then 'WScript.Echo "Client IP: " & oICASession.ClientAddress sClientIP = oICASession.ClientAddress If InStr(sClientIP, "192.168.2") Or _ InStr(sClientIP, "192.168.1")Then 'WScript.Echo "Trusted Subnet!" funcLocationCheck = True End If End If Next End Function |