Knowledge Base FAQ Item #7620040
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(viewed: 96)