Invoking Commands at Startup by Using the CONFIG.FP File

Last reviewed: June 27, 1995
Article ID: Q95714
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

You can invoke commands at startup by using the COMMAND= line in the CONFIG.FP file. However, FoxPro can invoke only one COMMAND= line. If multiple COMMAND= lines are in the file, FoxPro invokes only the last one.

To work around this limitation, do the following:

  1. Open a program using MODIFY COMMAND and name it START.PRG.

  2. Add two commands, such as CLEAR and DISPLAY MEMORY.

  3. Close the file.

  4. Open the CONFIG.FP file using MODIFY FILE.

  5. On the last COMMAND= line in the file, type the following and press ENTER:

          DO START.PRG
    

    The line should now look like the following:

          COMMAND= DO START.PRG
    

  6. Quit and restart FoxPro.

The CONFIG.FP file will use COMMAND= to run the START.PRG program, which will invoke the commands.


Additional reference words: FoxWin FoxDos 2.00 2.50a CONFIG.FP COMMAND
KBCategory: kbprg
KBSubcategory: FxenvConfigfp


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.