I have a process called monitor.exe and it can not have 2 active processes because it is a print monitor that if it has 2 active processes it will issue 2 duplicate invoices, so I would like to know if it has how do I make a script that checks if the process is active, if it has only 1 active and if it has more than 1 it finishes and leaves only 1 active?
I tried to make a simple script with taskkill / F / IM monitor.exe and then run a start \ path .exe \
But sometimes when I finish the process it goes up alone so if I give the start the 2 duplicates again, does anyone have any ideas?