Try a simple script with just a SHELL '%COMSPEC% ...' in it and see why it fails. I just cannot believe that it fails on the first try but succeeds on subsequent tries. And use @ERROR to evaluate potential error codes.
_________________________
There are two types of vessels, submarines and targets.