I am getting an error ‘Relevance Substitution Error’ when using the following script:
//get ConfigList version
waithidden cmd.exe /C ““c:\Program Files (x86)\Bit9\Parity Agent\DasCLI.exe” status | find “Config List:” > __Download\test.txt”
//Check if the host has updated policy
if {following text of position 23 of preceding text of first " of" of line 1 of file “__Download\test.txt” as integer > 1975286}
prefetch 12a8b1047e65343371a57df9b596f1d6451bcda2 sha1:12a8b1047e65343371a57df9b596f1d6451bcda2 size:318552 http://myserver.com:52311/Uploads/12a8b1047e65343371a57df9b596f1d6451bcda2/CleanZoom.exe.tmp sha256:afd25a6df762674d92861845632bccabd2b024a1c5ab880a5a63bd256249b7dd
extract 12a8b1047e65343371a57df9b596f1d6451bcda2
You provided neither the actioninfo nor the log file, so I’m supposing you got the error in the line
if {following text of position 23 of preceding text of first " of" of line 1 of file "__Download\test.txt" as integer} > 1975286}
probably because no integer is found in the position, or " of" is not found, or the file is not generated.
To avoid the error you can try to add an alternative value, eg 0, at the end of the command, using a pipe, e.g.:
if {(following text of position 23 of preceding text of first " of" of line 1 of file "__Download\test.txt" as integer | 0) > 1975286}
If You want to troubleshoot the error cause, add some lines to check and stop the execution in case of failure, before that one; e.g.:
continue if {exists file "__Download\test.txt"}
continue if {exists line 1 of file "__Download\test.txt"}
continue if {exists first " of" of line 1 of file "__Download\test.txt"}
continue if {exists position 23 of preceding text of first " of" of line 1 of file "__Download\test.txt"}
...
The action info and the client log will show the Failed action line
Thanks, Emilio. I pasted the action script that I used.
Yes, the error was on the line you mentioned. The problem was the targeted machine was unable to produce the test.txt file. I added a | false and it worked.