Exit Code 0 but still Action FAILED

I am trying to push custom exit code 0 at end of the task but even task is completely executed successfully it showing failed.

Not sure what I am missing here. Looked over other post related to it but suggestion is to use Task but in case this is part of Task itself & also using custom success criteria for completion.

if {exists file "C:\Program Files (x86)\BigFix Enterprise\BES Client\mytest.txt" whose (line of it as string contains "0")}
Exit 0
endif


STATUS: Running action...
Command succeeded (0) exit 0

not sure why that is not working but found another way to print our own exit code.

if {exists file "C:\Program Files (x86)\BigFix Enterprise\BES Client\mytest.txt" whose (line of it as string contains "0")} 
waithidden cmd.exe /c "exit 0"

Any time you quit the actionscript early with the exit statement it will evaluate as Failed.

1 Like