I'm struggling with a problem at my work. I want to develop a little script that runs in background (that's why I'm working with Windows Services) that catches when the user open certain apps, checks if there are available licenses for this program and writes what happened (given license, not given, already given...) in a log on a common server.
My problem comes at the moment that all this programs (or a set of them) share their process name (program.exe for example), so I can't difference between them and so can't compare if there are enough licences.
Any clue or idea?
Edit: My idea is to make every shorcut a .bat file which asks for license, triggers the service and then runs the program. Once the program is opened, I would like to check periodically if its still opened with something like this: How can I know if a process is running?