ActiveXperts Knowledge Base Article 7620040

Our mission at ActiveXperts Software is to deliver high quality Network Monitoring solutions and Windows Development components. Our goal is to supplement these solutions with timely support resources that can help at many different levels.
The first thing you want to do is try to find the answer to your problem in the Knowledge Base. If you cannot find an answer to your question in our Knowledge Base, or if you need additional information or assistance, please use our Contact Support form.


Q7620040 - I have an Action Script (.cmd batch script) that is launched when a check fails. It is working from the command prompt when I test it, but it is not working when used within ActiveXperts. What could be the reason?

When the scripts is in ActiveXperts as an Action Script, a different user context is used; it is the ActiveXpert Network Monitor service account context. So it can be a credentials issue. Besides that, there's no desktop interaction from the service.

Make sure you have logging enabled, and make sure you redirect all error messages to that log file too, i.e. redirect stderr to stdout like this: 2>&1, like this in your .cmd batch script. For example

@echo off
set logfile=C:\ProgramData\ActiveXperts\Network Monitor\Scripts\Action\Log.txt
echo Script started > "%logfile%" 2>&1
cd >> "%logfile%" 2>&1
thisgeneratesanerror >>  "%logfile%" 2>&1
echo Script ended >> "%logfile%" 2>&1

If you cannot find an answer to your question(s) in our Knowledge Base, or if you need additional information or assistance, please contact our Customer Support using our Contact Support Form

M