Blocking a process before it runs
I want to make a program that detect another instance of a program that is already running, already.
Probably using Win API is the smartest idea however i would like to create this program using either batch command or windows scripting.
The process i want to control is a java application that starts up using a batch file.
While the process is running if the same instance of this program is started then i want to block this before it actually gets "hooked".
Otherwise making the program okay to start.
Any ideas where i can start?