The problem is that you have delimited the string with the double-quote character ("), but you also want to include it in the string. When KiXtart encouters ths " character around $chain it terminates the string and therefore doesn't work.
You could have written the line either as:
code:
shell "find "+Chr(34)+$chain+Chr(34)+" file.txt > result.txt"
or
code:
shell "find "+'"'+$chain+'"'+" file.txt > result.txt"
But these are ugly - MCAs solution is neater.
Either quote can be used with Shell, there is no difference in how they work.
Your other problem (which MCA silently fixed) is that redirection using the ">" character is a DOS command shell semantic. This means that you have to run the command under the control of the DOS command shell which is why MCA used "%COMSPEC% /C" in the string.