My understanding of the action.command function in lua is that it will execute what you parse on the command line.
I actually want to kick off a python script but can't even run a batch script, it just comes back with return code 1.
It works for a command like dir or ipconfig but that is not much use.
Is this working as designed? or is it a bug or is there another way to do this?
this is the lua...
command="python hello.py"
print(command)
out, rc = action.command(command)
print("no of return lines ="..#out)
print("action command return code ="..rc)
for key,out_table in pairs(out) do
print(out[key])
end
UIM 20.4
Both the python and the script need to be fully qualified with the path
for example..
command="C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python39\\python E:\\Nimsoft\\probes\\service\\nas\\scripts\\send_nrdp.py -u " .. nrdp_url .. " -t " ..nrdp_token .. " -H "..hostname.." -S " .. status .. " -o " ..message
out, rc = action.command(command)