I was wondering how to differentiate between two different instances of a software that is running in C#. Let’s say I have 2 different videos running with the same software (both with KMPlayer) or I have two remote desktop sessions (mstsc.exe) open at the same time. I can use this code to get all the instances :
Process.GetProcessesByName("mstsc");
But how can I differentiate between those instances?
I am mainly looking to differentiate the different running video instances and remote desktop instances in my software.
Check if Process Id or MainWindowTitle works for you.