Microsoft KB Archive/156057

= PRB: EXE with Included CONFIG.FPW Does Not Allow -C Option =

Article ID: 156057

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q156057



SYMPTOMS
If a CONFIG.FPW configuration file is marked as Included within the Project Manager and this project is built into an EXE file, the -C Command line cannot be used to override the built-in CONFIG.FPW.



WORKAROUND
You can work around this problem in one of two ways:


 * Do not add the CONFIG.FPW to the project. Or, add it to the project but mark it Excluded. The CONFIG.FPW must be provided as a separate file but it can be overridden with a -c or -c . -or-


 * Give the configuration file a name other than CONFIG.FPW. The configuration file must always be specified on the Command line to be utilized but can be overridden by specifying -c or -c.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Create a new project, TEST.PJX.  Add a main program, TEST.PRG, with the following contents: =Messagebox("Main program!")   Create a CONFIG.FPW file with the following contents: TITLE=Built in CONFIG was used  Add the CONFIG.FPW file to the project as a Text File. It will be marked Included by default. Build an executable, TEST.EXE.  Create an alternate config file, OTHER.FPW, with the following contents: TITLE=Alternate CONFIG </li> From the Win95 RUN menu, execute:

C:\<directory with EXE>\TEST.EXE -cOTHER.FPW

</li></ol>

Despite the -c to override the built-in CONFIG file, the main Visual FoxPro window appears with the title of "Built in CONFIG was used," demonstrating that the built-in CONFIG.FPW file was used rather than OTHER.FPW.

There are two methods to work around the problem in the above example.

Method 1:
Under step 4 above, add the following: <pre class="fixed_text">  4a. In the Project Manager, right-click on the Config file and select Exclude.

Method 2:
Change step 3 above to read:

<ol>  Create a MYCONFIG.FPW file with the following contents: TITLE=Built in CONFIG was used </li></ol>

Change step 4 above to read:


 * 1) Add the MYCONFIG.FPW file to the project as a Text File. It will be marked Included by default.

Now the built-in configuration file, MYCONFIG.FPW, can be utilized only by specifying the configuration file, such as C:\<directory with EXE>\TEST.EXE -cMYCONFIG.FPW. Use of -c will cause no configuration file to be used, and -cOTHER.FPW will allow OTHER.FPW to be used.

Additional query words: kbdse VFoxWin

Keywords: kbenv KB156057

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.