visit Disconnect ICA session from inside, this method uses citrix api (more reliable).
Certain published EMR applications are assigned privileges based on endpoint and they fail to reevaluate those privileges at smooth roam. In my scenario the published app is running inside XenDesktop Session and the work around is to logoff the XenApp Session and connect to a new session at smooth roam.
Citrix doesn’t provide any documented way of doing this programmatically(SDK); one way is to use
pnagent.exe /logoff which closes all XenApp sessions and this is not an option for me.
Second way is to use functions from
C:\Program Files\Citrix\ICA Client\CCMSDK.dll
I couldn’t get any further because these functions are undocumented. Hence this is not an option either 🙂
finally I refreshed my skills in UI testing and wrote an AutoIt script that handles this programmatically
- Launch Connection Center
- Getfocus on the Treeview control of Connection Center
- Get all the child nodes of Activity (which are the names of the XenApp Servers)
- Find a match and send right click command to that node, followed by 4 down arrow keys and one enter keystroke which initiate’s the logoff
- Close Connection Center