Hi hraju,
I have a set of sample scripts/batch files that I use with the process agent to run a command. Bacially, during the online it creates a text file on the server that is the other scripts monitor for. The monitor just monitors that the text file exists and returns online or offline accordingly. Then the offlilne simple deletes the text file.
You can easily modify the start script to call your batch file. These are very simple to use and will need to be modified slightly if you want to change the name or location of the monitor text file. I'll send you an PM with the scample files.
Thanks,
Wally