PRB: Resolving "Run Command Failed" Error in FoxPro

Last reviewed: April 17, 1995
Article ID: Q87679
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5 and 2.5a

SYMPTOMS

A "Run command failed" error occurs in FoxPro.

CAUSE

There are three main causes for this error:

  • FoxPro cannot locate the COMMAND.COM file.
  • There is not enough conventional memory to run the command.
  • FOXSWAP.COM is not in the FoxPro directory.
  • If you are using the 32-bit version of FoxPro version 2.0 for MS-DOS, PROAPI16.EXE is not in the FoxPro directory.

RESOLUTION

To address this situation, perform the following five steps:

  1. Add a SHELL statement to your CONFIG.SYS file to specify the /P option switch. For example:

          SHELL=C:\DOS\COMMAND.COM /p
    

    where "C:\DOS\COMMAND.COM" points to a version of COMMAND.COM matching the MS-DOS version used to boot your computer.

  2. Edit your CONFIG.SYS and AUTOEXEC.BAT statements to free as much conventional memory as possible.

  3. Use FoxSwap to execute the command. (For example, to receive a listing of the current directory, specify RUN/0 DIR instead of RUN DIR.)

  4. For the 32-bit version of FoxPro, modify your CONFIG.FP file to remove the DOSMEM=ON statement, if it is present.

  5. Verify that the FOXSWAP.COM file is in the main FoxPro directory.

  6. For FoxPro version 2.0 for MS-DOS, verify that the PROAPI16.EXE file is in the main FoxPro directory. FoxPro version 2.5 for MS-DOS includes this functionality within FOXPRO.EXE itself.


Additional reference words: FoxDos 2.00 2.50 2.50a 2.x
KBCategory: kbprg kberrmsg kbprb
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.