Execute program, return results

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
serverteam
Posts: 6
Joined: Mon Jun 28, 2010 1:36 pm

Execute program, return results

Post by serverteam »

I have a program that will quit with errorlevel 0 on no error and any number > 0 on error. Also, it will print to stdout the various problems that causes the error. I am looking for a quick way to just take all of the output and message on it (email or whatever) when the return is > 0. I can't seem to do that with the External program test and the scripting only allows me to return one line for the status.

Maybe I'm missing something here?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, Shell Script test method may return test status and reply value as single line.
If you need to get some multi-line report and send it by e-mail, external application should be able to write this report into file.

I think you may use External test method and redirect output into text file.
Then use "Send e-mail" action to send text file as attachment
(another option: use special directive like <<IncludeFile=path_to_the_file>> in e-mail template)

Regards
Alex
Post Reply