1

I'm currently trying to create a small program that allows you to adjust the audio volume for each app that's currently running (just like the windows audio mixer). Identifying the process is done via the process id, but the problem is that some apps, like Google Chrome, use multiple processes (one for each tab) with the same name. I don't really know how to identify the main process, "Google Chrome" in this case. Currently I'm just getting the process id of each Chrome tab, instead of the program itself.

So, Is there a way to identify the main/parent process of a program?

kyro0
  • 45
  • 3
  • I don't know about windows, but don't programs have a process group id `pgid`? – Willem Van Onsem Aug 01 '17 at 15:36
  • The link from Piotr may be the correct way of doing the job, but a possible quick solution for GoogleChrome is to check the MainWindowTitle property of each of the processes - the main process has that property set to the currently selected tab name, all the rest are set to a blank string. – PaulF Aug 01 '17 at 16:47

0 Answers0