Jump to content
Welcome to our new Citrix community!
  • 0

Is there a possibility on a Windows PC to get a list of all running applications within a Citrix-Session?

Gerd Winkler


I am looking for a possibility with c# on a windows client pc to get a list of all running applications listed in the Citrix Connection-Center.


I tried the approach with the WfIcaLib.dll and following code:


    string SessionID = "";
    ICAClient client = new ICAClient();

    int EnumHandle = client.EnumerateCCMSessions();

    for (int counter = 0; counter < client.GetEnumNameCount(EnumHandle); counter++)
        client.EnableSessionSharingClient = true;
        EnumHandle = client.EnumerateCCMSessions();

        client.OutputMode = OutputMode.OutputModeWindowless;
        SessionID = client.GetEnumNameByIndex(EnumHandle, counter);

        client.StartMonitoringCCMSession(SessionID, true);

        foreach (IWindow item in client.Session.TopLevelWindows)
            if (item.Caption.Contains(args[0]))

catch (Exception ex)
    skypeIsRunning = 0;


This works but only once. I always get the same count of TopLevelWindows no matter whether an application has ended or added.


Does anybody has a solution for that problem?


3 years ago Hector seems to have the same problem: https://discussions.citrix.com/topic/387254-wficalib-caching-user-sessions/




Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...