'how to find the process with dynamic name

C# Windows 10 So I'm searching for 2 hours and now I am done - have no idea how to do it. I need to find the process that has dynamic name. I mean this is not working:

Process[] processes = Process.GetProcessesByName(proc.ProcName);

It wont find the process, because its name dynamicly changes. Finding processes by ID - no way, ID changes too. Any ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source