Do you mean check if a local service running?

Have a look at this thread for a simple solution:
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=165936&an=&page=0&vc=1