Have tried to get all main window titles of the same pid, but without luck. The main issue is that all Citrix Receiver connections are running on 1 PID, and therefore despite i have 2 Citrix windows in Task Manager, it is showing only the first one as being available. Both processes are running only under 1 PID.
*** How can I get all the opened Window Titles of the same process CDViever.exe? 1 PID ==>Many Processes with Window TItles.
PS They appear in TASK Manager, but whenever i retrieve the data in powershell or C# it is showing only the first main window title.
The c# code:
Process[] processlist = Process.GetProcesses();
foreach (Process theprocess in processlist)
{
Console.WriteLine("Process: {0} ID: {1} Window: {2}", theprocess.ProcessName, theprocess.Id, theprocess.MainWindowTitle);
Console.WriteLine("Window: {0}", theprocess.MainWindowTitle);
}
Console.ReadKey();
The powershell code i used is:
Get-Process | Where-Object {$_.mainWindowTitle} | Format-Table Id, Name, mainWindowtitle,IncludeUserName -AutoSize