Microsoft KB Archive/310423

= PRB: SET FOXPROSWX= in Autoexec.bat File Causes Errors in VFP 6.0 and 7.0 =

Article ID: 310423

Article Last Modified on 10/31/2001

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q310423



SYMPTOMS
You may receive the following errors:  When you start Visual FoxPro (VFP) 6.0 or Visual FoxPro 7.0, you receive the following error:

File '-x.prg' does not exist.

The error can appear with any of the following letters as part of the missing program file name: K, -E, -R, +R, -X, +X, -Y, -M, and ?. -or-

 When you create an executable file and try to start it, you receive the following error:

No PARAMETER statement is found.





CAUSE
The Autoexec.bat file contains the following line: SET FOXPROSWX= -X FOXPROSWX is an MS-DOS environment variable used in FoxPro 2.6. Valid switches for this environment variable are -C, -T, -K, -E, -R, +R, -X, +X, -Y, -M, and /?.

The error shown in the &quot;Summary&quot; section reflects the first letter assigned to the FOXPROSWX variable. The -C and -T switches do not cause the error because they are valid switches in Visual FoxPro.



RESOLUTION
Remove any reference to the FOXPROSWX environment variable from the Autoexec.bat file.



Steps to Reproduce Behavior
 Open or create an Autoexec.bat file on a computer that has VFP 6.0 or VFP 7.0 installed.  In the Autoexect.bat file, add the following line: SET FOXPROSWX= -X and then save the Autoexec.bat file. Restart the computer.  After the computer restarts, start VFP 6.0 or VFP 7.0. The following error appears:

File '-x.prg' does not exist.

</li></ol>

To reproduce the error with the executable, follow these steps: <ol> Follow steps 1 and 2 in the previous list.</li> Create a simple executable in either VFP 6.0 or VFP 7.0 and compile it.</li> Try to start the newly created executable and the following error appears:

No PARAMETER statement is found.

</li></ol>

Keywords: kbprb KB310423

-

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

© Microsoft Corporation. All rights reserved.