How to run FoxPro v2.0 under Vista
Philip Tagg

Prerequisites

[1] FoxPro v2.x operational on a Windows XP computer.

[2] Windows Vista on the target machine.

[3] Knowledge of how many FILES and BUFFERS your FoxPro v2 applications need.
This information may be already at the end of the file CONFIG.NT in the WINDOWS\SYSTEM32
folder on your XP machine, for example (in my case): BUFFERS=40, FILES=102.

Reservations

[1] The instructions below worked for me running FoxPro v2.0 under Windows XP SP2
("upgraded" unwittingly to SP3) and wanting to use it in the same way in Windows Vista (Business).
I don't know if these instructions will work under other versions of Vista but I don't see why not.

[2] I am a music professor, not a computer technician or computer manual writer.
Geeks will please excuse any faults or naivities in this article.
I do not guarantee that my solution will work for everyone reading this and I take no responsibility
for any problems resulting from following these instructions.
I am merely describing a solution that worked for me.

Instructions

[1] Make a BAT file in XP if you don't already have one.
This BAT file will contain the DOS command to call up FoxPro and can include
DOS parameters that might be relevant to your use of FoxPro.
Using a raw text editor on your XP machine, write a simple BAT file
calling up FOXPRO.EXE (not FOXPROX.EXE).
My BAT file, Fox95.BAT, runs like this:

=========

@ECHO OFF
ECHO Fox95.BAT. Loading FoxPro...

   REM If for some reason the system can't find FOXPRO...
IF NOT EXIST E:\FOX\FOXPRO.EXE GOTO nogo
   REM If you need to set up any paths for files called from
  
REM inside FoxPro...
  
REM PATH=C:\[path];D:\[path];E:\[path] etc.
  
REM If you need to set up specific DOS memory variables
   
REM for FoxPro, for example
  
REM SET mem1=foxpro

   REM Direct DOS to the folder where FOXPRO.EXE is situated.
  
REM On my XP machine it is in E:\FOX

CD E:\
CD FOX
  
REM Call up FOXPRO.EXE (-T = no opening screen) and whatever your
      REM first FoxPro
PRG/FXP is called (mine is START.PRG/START.FXP)
      
REM next line is the only really important one!

FOXPRO START -T

   REM Now you're in FoxPro.
  
REM Nothing needs to be written after you quit FoxPro

GOTO quit

:nogo
ECHO *** E:\FOX\FOXPRO.EXE not found ***
PAUSE

:quit ECHO Quit FoxPro
REM End of FoxPro95.BAT

=============

[2] Set up a PIF file under XP if you haven't already done so.
A PIF is a special shortcut, used in Windows 95 and later, for calling up DOS programmes.
To create that PIF, right click, still on your XP machine, FOXPRO.EXE and select Create Shortcut.

That should produce this at the bottom of the FoxPro directory:

Right click Shortcut to FOXPRO.EXE.
That should produce this sort of PIF dialogue:

Rename Shortcut to FOXPRO.EXE if you want: Idid.
Then click the Program tab.
That should look something like this:

(a) Change the icon, if you want: I have.
(b) Enter the appropriate command line pointing to where
     you saved the BAT file, explained earlier.
(c) Supply a Shortcut key if you want.
(d) Choose to run in a Normal winidow
(e) Check Close on exit
(f) Open the Memory tab and select the values
     shown in the next screen shot..

Click the Screen tab and select the values
shown in the next screen shot.

Click the Compatibility tab and select the values
shown in the next screen shot.

Save all these settings and close the PIF dialogue
(FoxPro v2.x Properties)

[3] Copy all your FoxPro software, code, data —everything—
to exactly the same place on the Vista computer.
Drive letter, path and filenames should all be identical to
what was on the XP machine.

[4] Copy the PIF file you just created to the Vista desktop.

[5] On your Vista machine, locate the folder C:\WINDOWS\SYSTEM32
and make safe copies of two files: AUTOEXEC.NT and CONFIG.NT

[6] Using a raw text editor on your Vista machine, add the following
lines to the end of C:\WINDOWS\SYSTEM32\AUTOEXEC.NT

SET FOXPROCFG=E:\FOX\CONFIG.FP
SET mem1=memory variable 1
SET mem2=memory variable 2

Note that the FoxPro configuration file I've given here (CONFIG.FP)
might be elsewhere on your computer or have another name.
The other DOS memory variables are only useful if you intend to
use FoxPro's !RUN command.

Save and close C:\WINDOWS\SYSTEM32\AUTOEXEC.NT

[7] Using a raw text editor on your Vista machine, change the end of
C:\WINDOWS\SYSTEM32\CONFIG.NT like this:

  REM Next line is original and should be left in tact
dos=high, umb
  
REM I added the next line
BUFFERS=40
  
REM Next line is original and should not be changed
device=%SystemRoot%\system32\himem.sys
  
REM Next line, added, can be useful if you want particular date formats, etc.
DEVICE=C:\WINDOWS\SYSTEM32\ANSI.SYS
    REM   Next line, added, is essential if you have large relational databases with
    
REM   lots of indexes and subroutines.
    
REM   After much experimentation I found that
    
REM   102 was OK for a music archive database containing 50,000 titles by
    
REM   30,000 composers/musicians, etc., in/on 10,000 albums/volumes/films, etc.

FILES=102
  
REM FILES is set by Windows to only 40!

Save and close C:\WINDOWS\SYSTEM32\CONFIG.NT

[8] Double-click the FoxPro PIF icon you copied to your Vista desktop as step [4], above.

FoxPro should run OK now. One problem, however, may be that Vista doesn't want to
run your PIF because so much havoc is wrought by PIFs reaching computers through
cyberspace and calling up nasty, evil and destructive little DOS-based routines.
Even if you accept to run your own PIF because you know it's OK (you created it!),
Vista might not let it run FoxPro properly. In this case, proceed as follows (double shortcut strategy).

[9] Move the FoxPro PIF from your Vista desktop to a safe place on your
Vista machine, away from Windows Vista system files. Don't forget where you moved it to!

[10] Right-click the FoxPro PIF icon in its new location on your
Vista machine and create a second shortcut to that shortcut.

[11] Put that second shortcut to the PIF shortcut in your Start Menu or Quick Menu.

[12] Double click your new shortcut to the PIF shortcut.

Finally

It's important to make safe copies of the original AUTOEXEC.NT and CONFIG.NT files
and to edit the original files in C:\WINDOWS\SYSTEM32, as shown above.
Windows Vista updates may affect all of this in the future:
I have no idea what plans the Microsoft people have. Who does?