You’ve written a script for GFI and, during normal testing, it works but when run from the GFI agent, it fails.
One possible reason for this is that the GFI agents adds additional arguments when running your script.
If you have optional parameters, your script may be treating one of the arguments GFI appends as an optional argument and responding incorrectly.
Most scripting languages have built-in argument-parsing functions that should be smart enough to handle this situation. The obvious exception is DOS batch files (which haven’t qualified as “smart” for a couple of decades at least). Thankfully, GFI is consistent in how it appends its args. Once you see “-logfile”, that’s the start of GFI’s arguments.