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



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Windows 7.0

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 "Summary" 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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open or create an Autoexec.bat file on a computer that has VFP 6.0 or VFP 7.0 installed.
  2. In the Autoexect.bat file, add the following line:
    SET FOXPROSWX= -X
    						
    and then save the Autoexec.bat file. Restart the computer.
  3. After the computer restarts, start VFP 6.0 or VFP 7.0. The following error appears:
    File '-x.prg' does not exist.
To reproduce the error with the executable, follow these steps:
  1. Follow steps 1 and 2 in the previous list.
  2. Create a simple executable in either VFP 6.0 or VFP 7.0 and compile it.
  3. Try to start the newly created executable and the following error appears:
    No PARAMETER statement is found.

Modification Type:MajorLast Reviewed:10/31/2001
Keywords:kbDSupport kbprb KB310423