External program not testing properly

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
Tracy Casey
Posts: 1
Joined: Fri Dec 12, 2003 10:40 am

External program not testing properly

Post by Tracy Casey »

I have a batch file I run as a test and at the end, it types a text file. If the text file contains anything, I want it to alert.

This used to work and now it's not. I don't remember the previous version we were on, but we're running 3.44 now.

I have the test set to "Alert if the errorlevel returned by program is <> from 0". (not my grammar - it's worded that way in the app)

If I run a test file that does nothing but type the text file with a 1 in it, the test still passes.

What am I doing wrong? Please help!

Thanks!
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

If I run a test file that does nothing but type the text file with a 1 in it, the test still passes.
As I understand you are using "External" test method?
Of course it passes because ERRORLEVEL in this case = 0.
If you want to start alert when ERRORLEVEL<>0, your script should return different ERRORLEVEL code.
I have a batch file I run as a test and at the end, it types a text file. If the text file contains anything, I want it to alert.
If you want to check contents of the file you should use another test, e.g. "Compare Files" test. "External" test does not check any files, it checks ERRORLEVEL code that returned by an external program.
This used to work and now it's not.
Probably you have changed script?
I don't remember the previous version we were on, but we're running 3.44 now.
If you have license for HostMonitor version 3, you may upgrade to HostMonitor 3.71 at no cost.
Looks like you made upgrade to version 3.44 long time ago. Right? But test stop work now? It means you have changed your script. Right?

Regards
Alex
Post Reply