Issue with batch files and alerts

pat15312

New Member
I’ve created a series of .bat files that work in conjunction with SwithMail .xml files to send an email if an alert trigger criteria is met.

Initially, this system worked perfectly as expected. Unfortunately, this stopped working after the first day…

My first port of call was to ensure that the emails weren’t being blocked due to being identified as spam. This was not the case.

I then checked to see if the .bat files were being blocked by Windows. I ran all of the .bat files individually and every one triggered the correct email message being sent.

The last thing I’ve looked into is to see if HWiNFO is for some reason not running the .bat when the alert criteria is reached. I forced one of the alerts to trigger and could see the cmd prompt window opens for a split second and then disappear - nothing else happened.

I changed the alert frequency to once every 10 secs and logged the alert to HWiNFO_AlertLog.txt to confirm that the trigger was working correctly - it was.

At this point I’m a bit stuck. The thing that makes the least sense is that this system did briefly work as planned. I wonder if there is something about HWiNFO launching these .bat files repeatedly which may lead to this action now being blocked by Windows? If so, I’d have though there must be some way to make an exception for this?

Any help would be appreciated.
 
I'd first recommend to add some check into your bat file that would tell you if it was run.
If it is, verify its content especially things like use of relative/default paths. This is usually the most common issue.
 
Thanks for the speedy reply.

My .bat file contains two paths - one to the SwithMail application and one for the .xml which contains all the information used by SwithMail to create and send the email notification.

Whilst I was using a full path to describe the location of the .xml file, I was using a relative path to describe the location of the SwithMail .exe. I've changed this to be a full path and everything is now working :)

Really appreciate your help with this Martin!
 
Back
Top