Run executable from specific folder

The demo fixlet leaves a file secret.txt in the client folder with the secret.
You will want to delete that file or your secret will be left hanging around in the open.

I have an if statement in there now that will clear things out of there. Am I correct in assuming that I should edit the custom success criteria to be successful when all lines of the action script have completed?

The success criteria depends on what you’re doing, there’s no “one size fits all” answer.

If you are making a change to the system that you can detect in relevance, it’s usually better to use that relevance as the success criteria. For example your system changes from “software X is not installed” to “software X is installed”.

If you are not making a change to the system that you can detect, for example restarting a service, then yes you’d change the criteria to “All lines of the script completed”. That doesn’t check whether your script is correct, whether it was successful, whether it did the thing you wanted to do…just that every line executed without an ActionScript error.

1 Like

Yes, makes sense. Thank you very much everyone for the assistance.

1 Like

Hi all,

I tested this task successfully by itself, however once I placed in the Server Automation plan I needed it in, the step fails at the line with the dos commands:

At 14:00:10 -0400 -
ActionLogMessage: (action:3031327) Action signature verified for Execution
ActionLogMessage: (action:3031327) starting action
At 14:00:10 -0400 - actionsite (http://servername:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded delete No ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite(pathname’ exists to delete, no failure reported (action:3031327)
Command failed (Relevance substitution failed) dos echo {parameter “secret” of action} > “{(pathname of parent folder of data folder of client) & “\secret.txt”}” (action:3031327)
At 14:00:10 -0400 -
ActionLogMessage: (action:3031327) ending action
At 14:00:10 -0400 - mailboxsite (http://servername:52311/cgi-bin/bfgather.exe/mailboxsite1618681074)
Not Relevant - #{IEMPlan 3030848,109,O} CNE Place PageCenterX into Read only Mode (fixlet:3031327)
At 14:00:13 -0400 -

Thoughts? Will this not work in an automation plan? That was the ultimate goal here.

I’m not sure how one would supply a secure parameter to an automation plan, since the cleartext value would have to be available somewhere for the automation engine to use it? I’m afraid I haven’t dealt with SA all that much.