Task Actionscript - Run Check. If Fail, task get status failed, but script continues


I am creating a script that checks a log file under patching. What i want it to do is if the check fails, the task get the status failed in the baseline action, but it continues running the rest of the script. I have found ways of giving it failed, but then it stops up and moved to the next fixlet or task in baseline

Anyone got any tips?



Check the execution tab when Taking an Action on the baseline.

The last checkbox should be unchecked if you don’t want the baseline to continue if a component fails.


Now that I posted this where I wanted to…


When choosing this method it does not finish the fixlet where in the script failed. It jumps automatically to the next fixlet. I want mine run through the whole script even if one line fails a if relevance line. IF this failed, fixlet gets status failed, but continues throu the next part of the fixlet inn the baseline.


That’s different…

You just need to set a value and then check it later in the Task. Something like

waithidden dosomething.exe
if {exit code of action = 0 or exit code of action = 3010}
  parameter "result"="success"
  parameter "result"="failure"

// do other things
// Now return Failure on the task if the earlier result was a failure
continue if {parameter "result" of action = "success"}

That should work. Thanks for the help @JasonWalker !

I’m trying to make an action script do something similar, but It’s still quitting on the first failed line, Am I missing some Syntax here?

waithidden MsiExec.exe /uninstall {716E0306-8318-4364-8B8F-0CC4E9376BAC} /quiet
if {exit code of action = 0 or exit code of action = 3010}
parameter "result1"="success"
  parameter "result1"="failure"

I’m getting a failure on the waithidden line

Try adding the full path to MsiExec.exe. The agent may not be able to find the executable from it’s Path variable.

Realized I’m also missing the Double Curly to escape relevance. Testing it again.

Jea, looks like that is the problem.

waithidden MsiExec.exe /uninstall {{716E0306-8318-4364-8B8F-0CC4E9376BAC} /quiet

The Double Curly should fix the problem as you mentioned.

1 Like

That was it. Works great now, Detects and Removes MSXML 4.0 Will post to bigfix.me when I’m confident in it. Thanks Internet rubber duckies!