Link to home
Start Free TrialLog in
Avatar of chpchai
chpchai

asked on

How to make sure only one process running?

I have a application, and I don't want user to start the same program with two instance.
How do I detect there is a instance already running?
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chpchai
chpchai

ASKER

How to terminate the program then?
app.previnstance checks to see if itself is running, then if it is, end kills it

if   app.previnstance   then   end
if (program is running) then (quit)