Syntax error when targeting win 7

I think you may be getting into a troublesome edge case, where the client has to evaluate all of the Relevance substitutions in the script before the script executes - in case any of those are used in building a download file that needs to be prefetched before the action executes. But if any of those relevance statements throw an error (like the file doesn’t exist yet, because your action hasn’t written it), the action terminates without ever executing.

The hard workaround is to change all of your relevance statements so they don’t throw an error during pre-execution evaluation. It’s ok for them to have an empty result, but not ok to throw an error. The singular {(it contains "False") of Line 1 of file "C:\windows\temp\bigfix_test_powershell.txt"} will throw an error if the text file does not exist, while the plural {(it contains "False") of Lines 1 of files "C:\windows\temp\bigfix_test_powershell.txt"} should just give an empty result rather than an error (and allow the pre-execution evaluation to succeed).

The easy way is to create a Prefetch Block and put all of your downloads there. When there is a Prefetch Block, only the substitutions in the Prefetch Block itself are evaluated before the action starts, all the other substitutions outside of the block would then only evaluate while the action is executing.

A little more detail on this at

1 Like