Thanks, Sal I love the sysinternals tools too. However, psservice within a batch file will let me know a service is stopped, but I can't directly apply that in a pre-command. The command runs successfully, and then the backup jobs runs.
I need a command that will fail if a service is stopped, so that when used a pre command in backup exec it will not proceed with the job.
Why don't you use the option under Pre&Post commands settings in the backup job properties - > Run job only if pre-command is successful ?
Select this option to run the backup or restore job only if the pre-command is successful. If the pre-command fails, the job does not run, and is marked as failed.
If it is critical that the job does not run if the pre-command fails, then select Allow pre- and post-commands to be successful only if completed with a return code of zero. If a non-zero code is returned, it is interpreted by Backup Exec to mean that the pre-command did not run successfully. The job is not run and the job status is marked as Failed.
NOTE : If we do not receive your reply within two business days, this post would be marked assumed answered and would be moved to answered questions pool.