Greg,
See
Exiting Visual FoxPro returning an error level FAQ #7767
>How can I make VFP EXE return an error code if an error is detected. I am having one EXE call an another EXE via the WScript Run method, and capturing the return error code. But I do not know how to set the error code in the child EXE.
--sb--