Think you ran your FOO.EXE without %comspec%

Mabye something like this.

Code:
SHELL '%COMSPEC% /E:1024 /C c:\temp\foo.exe  >nul 2>nul'