Install And Run Different VFP 9 Versions On One Computer
Install and Run Different VFP 9
Versions on One Computer
Rick Schummer
White Light Computing, Inc.
42759 Flis Dr.
Sterling Heights, MI 48314
Voice: 586.254.2530
Email: raschummer@whitelightcomputing.com
Web site: http://whitelightcomputing.com
Free Tools: http://www.whitelightcomputing.com/resourcesfreedevelopertools.htm
Blog: http://rickschummer.com/blog
Southwest Fox Conference: http://SWFox.net
This white paper outlines the steps needed to install VFP 9 original (Released to Manufacturing – RTM),
Service Pack 1 (SP1), and Service Pack 2 (SP2) all on the same computer so you as a developer can test for
different behavior and make choices with respect to the version of VFP you want to develop and deploy
solutions.
Table of Contents
Introduction ................................................................................................................................................... 3
Feedback ........................................................................................................................................................ 3
Disclaimer ....................................................................................................................................................... 3
Visual FoxPro Folders ..................................................................................................................................... 3
Where do I get updates? ................................................................................................................................ 4
Backups .......................................................................................................................................................... 4
VFP 9 RTM Installed ....................................................................................................................................... 5
VFP 9 RTM to SP1 ........................................................................................................................................... 6
VFP 9 SP1 to SP2 ............................................................................................................................................ 6
Final Folder Structure ..................................................................................................................................... 7
Real World File Swapping .............................................................................................................................. 8
Sharing Development ..................................................................................................................................... 8
Separating Development ............................................................................................................................... 8
Sedna Installation ......................................................................................................................................... 11
Conclusion/Summary ................................................................................................................................... 11
Special thanks .............................................................................................................................................. 12
Resources ..................................................................................................................................................... 12
Change Log ................................................................................................................................................... 12
Copyright ...................................................................................................................................................... 12
Author Profile ............................................................................................................................................... 12
Developer Tools ........................................................................................................................................... 12
Page 2
Introduction
Installing a new version of Visual FoxPro can be a daunting task when you consider the
overhead of completely system testing all the applications you have released, or are
planning on releasing in the near future. What fixes in the product can you take advantage
of, and what new regression bugs did the FoxPro Team include in the new release that
breaks your code? What are the risks of implementing a new service pack? Can you afford
to give up the current stable release and the known set of issues without breaking stride?
These are good business questions developers should be asking when updating or
upgrading their favorite developer language.
Wouldn’t it be great if you could have the old version of Visual FoxPro as well as the new
service pack on the same machine so you can test the new version before you adopt it as
the current and only version? You can use a virtual machine with the free version of
Microsoft’s VirtualPC, or its competitor VMWare. The overhead of installing the operating
system in the virtual machine, all the configuration you need to do to match your current development environment
and then installing all your source code and developer tools is certainly a lot of work. You might not even be able to do
this depending on the licensing restrictions of the framework and developer tools you use.
You certainly could put it on a separate machine, but not everyone has a secondary development machine. Besides,
the secondary machine is usually a generation below your current development machine and could be underpowered
for your testing.
I have VFP 9 RTM (Release to Manufacturing – unpatched), Service Pack 1 (SP1) and Service Pack 2 (SP2) loaded on my
primary development machine in separate development folders. The three versions share some resources and they
have separate settings for other resources and configuration. The rest of this white paper outlines how I got all three
on the same machine and some things you need to consider when doing this.
The techniques discussed in this white paper were first posted in a blog entry I made during the VFP9 SP1 beta. I
improved on this technique during the SP2/Sedna Community Technology Preview (CTP) release. Developers need to
develop in a release they have tested and consider stable, but also want to investigate the stability of the latest
release. This white paper will help establish the environment to all the production development continue, and test out
the latest release to ensure it is stable enough for production development.
Feedback
Please send any feedback about this process to raschummer@whitelightcomputing.com. I have used this sort of
process over the years and was tweaked based on the feedback of others, but might not be perfect for you. If you find
something that does not work or is confusing, please let me know so I can make this process better for others who
read it after you do.
Disclaimer
We are all adults here, but this document comes "as is", with no warranties. None whatsoever. This means no express,
implied or statutory warranty, including without limitation, warranties of merchantability or fitness for a particular
purpose or any warranty of title or non‐infringement. Some settling can happen during shipment, your mileage may
vary, etc.
Visual FoxPro Folders
The key to success with respect to installing multiple copies of Visual FoxPro 9 on the same machine is understanding
where the Visual FoxPro files are stored.
Files
Common Folder Locations
VFP Home folder
C:\Program Files\Microsoft Visual FoxPro 9
Common Files
C:\Program Files\Common Files\Microsoft Shared\VFP
Merge Modules
C:\Program Files\Common Files\Merge Modules
Tool Metadata
C:\Documents and Settings\<user>\Application Data\Microsoft\Visual FoxPro 9
Page 3
Where do I get updates?
Visual FoxPro 9 is installed from a CD purchased individually, or from an MSDN Subscriptions (CD/DVD or download).
The Visual FoxPro updates are available from the Microsoft MSDN site (see Figure 1):
http://msdn.microsoft.com/vfoxpro
Figure 1. The Visual FoxPro Developer Center – Download page.
The only update you can get for Visual FoxPro 9 on the MSDN Web site is SP2. Microsoft removed SP1 from the MSDN
Web site. As of the writing of this white paper you can still find it on the Microsoft Downloads pages. Here are the
links:
VFP 9 SP1
http://www.microsoft.com/downloads/details.aspx?familyid=1C06E35D‐10A2‐4A05‐84FC‐
495B3A73ECF7&displaylang=en
VFP 9 SP2
http://www.microsoft.com/downloads/details.aspx?FamilyID=a28ddec6‐ba3c‐49d0‐8176‐
8c0b3fca06d1&displaylang=en
(One special note about SP2. Microsoft released the SP2 twice. The first time was missing some key
files in the build. The second version of SP2 was released October 15th and is affectionately referred
to as SP2a. When you install this version make sure the VERSION() function returns October 15,
2008 as the build date.)
If you have an MSDN subscription you will find the VFP 9 SP1 files on the CD/DVD.
Backups
If you already have VFP 9 installed on your machine, you should make a backup of the four folders mentioned in the
section titled “Visual FoxPro Folders.” This provides you with the ultimate safety net in case something goes wrong.
You can always start over by uninstalling Visual FoxPro 9.0 and reinstalling, but using a backup is faster.
NOTE: I know some developers install developer tools and other things in the main VFP folder and in subfolders. You
need to protect these files anytime you are installing or uninstalling Visual FoxPro. If you have changed any of the
Page 4
samples, registered any custom builder or wizards, or changed any of the Fox Foundation Classes (FFC) you may need
to take some extra care as well.
You also might consider backing up the registry entries too if you want to restore the most recent configuration. Run
RegEdit from the Windows Run command line. The registry entry is found here:
HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\9.0
Right‐click on the VFP 9 node and select the Export option (see Figure 2). This will prompt you to save the file with a
REG extension. Tto restore the registry settings double‐click on the REG file in Windows Explorer.
Figure 2. Exporting the registry is done by locating the node and using the shortcut menu to save to a file.
VFP 9 RTM Installed
Naturally you have to start with a copy of VFP 9 RTM so install this first if you have not. If you already have SP1
installed and don’t care about RTM, skip ahead to the section VFP 9 SP1 to SP2. Having a copy of VFP 9 RTM is not as
important since SP1 is considered extremely stable. The only reason I have a copy of it is to test behavior before the
service packs were released.
1) Install VFP 9 RTM.
2) Go to the VFP Common folder: C:\Program Files\Common Files\Microsoft Shared\VFP
3) Create a subfolder called VFP9RTM
4) Copy all the VFP9 Runtime files including VFP9r.dll, VFP9t.dll, VFP9rXXX.dll (resource files, especially the ones you
deploy), the three Report*.app files, the FoxHHelp9.exe, and the FoxHHelpPs9.dll to this new subfolder.
5) Go to the Merge Module folder: C:\Program Files\Common Files\Merge Modules
6) Create a subfolder called VFP9RTM
7) Copy all the VFP 9 merge modules to the new subfolder. The list is: vfp9rchs.msm, vfp9rcht.msm, vfp9rcsy.msm,
vfp9rdeu.msm, vfp9resn.msm, vfp9rfra.msm, vfp9rkor.msm, VFP9RptApps.msm, vfp9rrus.msm,
Vfp9Runtime.msm, vfpodbc.msm, vfpoledb.msm, VFP9HTMLHelp.msm, VFP_GDIPlus.msm
At this stage you have a backup of all the important files in case you need to re‐establish a VFP 9 RTM environment. If
you run the VFP9.EXE file in the main VFP 9 folder and issue a ?VERSION(1) in the Command Window you will see
“Visual FoxPro 09.00.0000.2412 for Windows [Dec 13 2004 11:21:37] Product ID xxxxx‐xxx‐xxxxxxx‐xxxxx”
Page 5
VFP 9 RTM to SP1
I start with current VFP 9 RTM folders in the main VFP 9 folder.
1) Copy the main VFP 9 folder to another folder. I call mine: C:\Program Files\Microsoft Visual FoxPro 9 NoSP. You
now have two identical VFP folders.
2) Install VFP 9 SP1, which installs the service pack over the main VFP 9 folder.
3) Go to the following folder: C:\Program Files\Common Files\Microsoft Shared\VFP
4) Create a subfolder called VFP9SP1
5) Copy all the VFP9 Runtime files including VFP9r.dll, VFP9t.dll, VFP9rXXX.dll (resource files, especially the ones you
deploy), the three Report*.app files, the FoxHHelp9.exe, and the FoxHHelpPs9.dll to this new subfolder.
6) Go to the following folder: C:\Program Files\Common Files\Merge Modules
7) Create a subfolder called VFP9SP1
8) Copy all the VFP 9 merge modules to the new subfolder. The list is: vfp9rchs.msm, vfp9rcht.msm, vfp9rcsy.msm,
vfp9rdeu.msm, vfp9resn.msm, vfp9rfra.msm, vfp9rkor.msm, VFP9RptApps.msm, vfp9rrus.msm,
Vfp9Runtime.msm, vfpodbc.msm, VFP9HTMLHelp.msm, VFP_GDIPlus.msm, vfpoledb.msm (which may be in this
folder or found in C:\Program Files\Common Files\Microsoft Shared\Merge Modules – and is not changed by
installing VFP 9)
At this stage you have a backup of all the important files in case you need to re‐establish either a VFP 9 RTM, or an SP1
environment. If you run the VFP9.EXE file in the main VFP 9 folder and issue a ?VERSION(1) in the Command
Window you will see
“Visual FoxPro 09.00.0000.3504 for Windows [Nov 4 2005 17:39:44] Product ID xxxxx‐xxx‐xxxxxxx‐xxxxx”
VFP 9 SP1 to SP2
There is a general recommendation to install Service Pack 2 over the RTM version of Visual FoxPro 9, not over the SP1
version. It gives you the cleanest results. If you install over SP1 and you have changed any file in the VFP 9 folder, the
Service Pack 2 install will not overwrite the newer file. Considering how easy it is to unknowingly change files; Merely
opening an FFC VCX‐based class to look at it changes the file because VFP changes the file date; Any recompile
changes the contents of forms and classes; Tweaking a record in the sample data or adding to the meta data for
builders or wizards can also change the file. Any of these can inadvertently lead to an incomplete installation of SP2.
1) Rename your main VFP 9 folder to another folder. I call mine: C:\Program Files\Microsoft Visual FoxPro 9 SP1.
2) Copy your VFP 9 RTM folder or uninstall/reinstall VFP 9 RTM (or copy the SP1 folder if you are comfortable with
this) to the main folder location. My main folder is called C:\Program Files\Microsoft Visual FoxPro 9.
3) Install VFP 9 SP2, which installs the service pack over the main VFP 9 folder.
4) Go to the following folder: C:\Program Files\Common Files\Microsoft Shared\VFP
5) Create a subfolder called VFP9SP2
6) Copy all the VFP9 Runtime files including VFP9r.dll, VFP9t.dll, VFP9rXXX.dll (resource files, especially the ones you
deploy), the three Report*.app files, the FoxHHelp9.exe, and the FoxHHelpPs9.dll to this new subfolder.
7) Go to the following folder: C:\Program Files\Common Files\Merge Modules
8) Create a subfolder called VFP9SP2
9) Copy all the VFP 9 merge modules to the new subfolder. The list is: vfp9rchs.msm, vfp9rcht.msm, vfp9rcsy.msm,
vfp9rdeu.msm, vfp9resn.msm, vfp9rfra.msm, vfp9rkor.msm, VFP9RptApps.msm, vfp9rrus.msm,
Vfp9Runtime.msm, vfpodbc.msm, VFP9HTMLHelp.msm, VFP_GDIPlus.msm, and vfpoledb.msm (which may be in
this folder or found in C:\Program Files\Common Files\Microsoft Shared\Merge Modules – and is not changed by
installing VFP 9)
At this stage you have a backup of all the important files in case you need to re‐establish any of the VFP 9 RTM, SP1 or
SP2 environments. If you run the VFP9.EXE file in the main VFP 9 folder and issue a ?VERSION(1) in the Command
Window you will see
“Visual FoxPro 09.00.0000.5815 for Windows [Oct 15 2007 09:11:06] Product ID xxxxx‐xxx‐xxxxxxx‐xxxxx”
Page 6
Final Folder Structure
Now I have this for the VFP EXE root folders under the Program Files folder (see Figure 3).
Figure 3. The three VFP 9 folders on my development machine are found under Program Files.
The main VFP9 folder on my machine now contains SP2. I have SP1 and RTM in separate folders. I then create
shortcuts (see Figure 4) to each separate VFP9.EXE.
Figure 4. This is the Properties dialog for my VFP 9 SP1 shortcut.
Page 7
The most important folders you need to watch are the VFP 9 Common Files folder (see Figure 5) and the Merge
Module folder because these files are the ones you will ship to your customers via your favorite installer. Here is the
C:\Program Files\Common Files\Microsoft Shared\VFP folder…
Figure 5. The Common Files folder is critical because you ship these files to your customers via installers like Inno
Setup.
Real World File Swapping
I swap in the runtimes as needed, but 99% of the time they are the SP1 because this is what I am shipping these days.
All I have to do is copy the files from the appropriate subfolder to the root folder. Once SP2 has been tested
completely and certified okay for my customer applications, I will keep them in the common folder 99% of the time.
Sharing Development
There are certain files I share between the different versions of Visual FoxPro 9, including the same FoxUser resource
file, Config.FPW, and the tool metadata files found in:
C:\Documents and Settings\<user>\Application Data\Microsoft\Visual FoxPro 9
This gives me the things I like to be common such as IDE windows showing up in the same place no matter what
version I am using. It means the DataExplorer has all the same configuration settings and connections. If you set this
up properly you can do the same thing for the Code References tool, the Environment Manager (run separately or as
part of the Task Pane Manager), a common IntelliSense table, ToolBox configuration, and Task List.
The registry is shared and I accept that. You can manipulate the registry programmatically if you like. I have not had
any problems with a shared registry between the versions.
Separating Development
The last thing I need to discuss is the things I do separate between the versions. My start‐up program sets the various
things I don’t want shared. I believe I got many of the ideas from Trevor Hancock or Jim Saunders years ago. Both of
these gentlemen are superior tech support individuals working for Microsoft Product Support Services:
Page 8
_wizard = HOME()+'wizard.app'
_builder = HOME()+'builder.app'
_browser = HOME()+'browser.app'
_converter = HOME()+'convert.app'
_genxtab = HOME()+'vfpxtab.prg'
_genmenu = HOME()+'genmenu.prg'
_runactivedoc = HOME()+JUSTFNAME(_runactivedoc)
_beautify = HOME()+JUSTFNAME(_beautify)
_coverage = HOME()+JUSTFNAME(_coverage)
_gallery = HOME()+JUSTFNAME(_gallery)
_genhtml = HOME()+JUSTFNAME(_genhtml)
IF TYPE('_codesense') # 'U'
_codesense = HOME()+JUSTFNAME(_codesense)
ENDIF
IF TYPE('_objectbrowser') # 'U'
_objectbrowser = HOME()+JUSTFNAME(_objectbrowser)
ENDIF
IF TYPE('_tasklist') # 'U'
_tasklist = HOME()+JUSTFNAME(_tasklist)
ENDIF
IF TYPE('_taskpane') # 'U'
_taskpane = HOME()+JUSTFNAME(_taskpane)
ENDIF
IF TYPE('_toolbox') # 'U'
_toolbox = HOME()+JUSTFNAME(_toolbox)
ENDIF
IF TYPE('_foxcode') # 'U'
_foxcode = HOME(7) + JUSTFNAME(_foxcode)
ENDIF
IF TYPE('_foxtask') # 'U'
_foxtask = HOME(7) + JUSTFNAME(_foxtask)
ENDIF
IF TYPE('_foxref') # 'U'
_foxref = HOME() + JUSTFNAME(_foxref)
ENDIF
IF TYPE('_reportbuilder') # 'U'
_reportbuilder = HOME()+'reportbuilder.app'
ENDIF
IF TYPE('_reportoutput') # 'U'
_reportoutput = HOME()+'reportoutput.app'
ENDIF
IF TYPE('_reportpreview') # 'U'
_reportpreview = HOME()+'reportpreview.app'
ENDIF
lcHelp = SET('Help',1)
IF FILE(HOME() + JUSTFNAME(m.lcHelp))
SET HELP TO HOME() + JUSTFNAME(m.lcHelp)
ENDIF
Page 9
A couple of months ago I refactored this code to deal with a couple of things I missed (reporting APPs were all shared
to the SP1 set), so it is a little less tested than the previous version. I have not tested this configuration under
Windows Vista. I recognized how this code could be a problem with some of the DBF files for things like the
IntelliSense table (_FoxCode), the Task List table (_FoxTask), etc. It might be better to use the HOME(7) folder for
some of the other files, but you would also be committing to share these files if you do so. The HOME() folder is
unique to the different releases.
You can inspect the Options dialogs (Figure 6, 7, & 8) to see the impact of this code in your start up program.
Figure 6. The VFP 9 RTM Options dialog.
Figure 7. The VFP 9 SP1 Options dialog.
Page 10
Figure 8. The VFP 9 SP2 Options dialog.
Sedna Installation
Sedna is a collection of tools, libraries, samples and add‐ons to Visual FoxPro 9.0. The Sedna components install
separately, are not related to SP2, and do not directly impact the implementation of the various versions of VFP 9. I
still think it is important to discuss in this white paper.
The Sedna install will create a Sedna folder under the main VFP 9 folder. This install does not require VFP 9 SP2, and
the components will work with VFP 9 SP1. The only requirements for using the Sedna components I know are:
Sedna Component
Requirements
DDEX Provider
Requires Visual Studio .NET 2005 because it was designed to help .NET developers access
Visual FoxPro data inside of .NET.
Net4COM
Requires Visual Basic.NET if you want to review the source code for the component. The
.NET 3.5 runtimes are required if you are developing with or distributing this
functionality.
Upsizing Wizard
Requires SQL Server 2000 or 2005 installed and access granted to upsize VFP databases
to SQL Server
Vista Dialogs for COM
Requires Windows Vista as the dialogs are designed to work on Windows Vista.
The My for VFP IntelliSense extension library and the DataExplorer both work fine under SP1 and SP2, and have no
additional requirements. One note about the DataExplorer: if you want the new version to show up in the Task Pane
Manager you need to copy the Sedna version from the Sedna\DataExplorer folder to the main VFP 9 folder and
overwrite the original version (was not updated in SP1).
You can install the Sedna files once, and copy the folder over to the other VFP 9 folders, but the COM registration will
still point to the original installed files where you installed them. I personally only have Sedna files stored in the main
VFP 9 folder and have copied the DataExplorer to the other folders as needed.
Conclusion/Summary
I hope you found the information presented in this white paper a useful guide in getting the different versions of
Visual FoxPro 9 installed and working on your development machine. The main reason I wrote this up was to
encourage developers who were hesitant to install Visual FoxPro 9 Service Pack 2 to get it installed and begin the
Page 11
testing process. The more people who test the service pack the more issues will be surfaced and workarounds
designed. If there are no workarounds found for the bugs we can better present the issues to Microsoft in hope they
will put in the effort to fix them based on the FoxPro Community’s need for a stable service pack.
Special thanks
These materials in this white paper were reviewed by several of my friends in the FoxPro Community. Special thanks
to Pamela Thalacker, Mary Pilon, Tamar Granor, and Cathy Pountney for reviewing this process before publication.
Resources
“Unofficial” Bug List: http://fox.wikis.com/wc.dll?Wiki~VFP9SP2BugList~Wiki
Official Bug List:
https://connect.microsoft.com/VisualStudio/feedback/SearchResults.aspx?Advanced=true&KeywordSearchIn=2&Sear
chQuery=vfp+OR+foxpro&FeedbackType=0
Post issues for Microsoft to investigate here:
https://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx
Change Log
Date
Version
Updater
Description
March 1, 2008
1.0
Richard A. Schummer
Initial release
Copyright
Copyright © 2008 – Richard A. Schummer. All Worldwide Rights Reserved. Permission to translate to other languages is
granted, but please send copy to Rick so he knows about it, and can host the different translations.
Author Profile
Rick Schummer is the president and lead geek at White Light Computing, Inc., headquartered in southeast Michigan, USA. He prides
himself in guiding his customer’s Information Technology investment toward success. After hours you might find him creating
developer tools that improve developer productivity, or writing articles for his favorite Fox periodicals. Rick is a co‐author of Visual
FoxPro Best Practices for the Next Ten Years, What’s New In Nine: Visual FoxPro’s Latest Hits, Deploying Visual FoxPro Solutions,
MegaFox: 1002 Things You Wanted To Know About Extending Visual FoxPro, and 1001 Things You Always Wanted to Know About
Visual FoxPro. He is regular presenter at user groups in North America and has enjoyed presenting at GLGDW, Essential Fox, VFE
DevCon, Southwest Fox, German DevCon, Advisor DevCon, and OzFox conferences. Rick is also an organizer for Southwest Fox and
an administrator of VFPX. You can contact him via email at raschummer@whitelightcomputing.com, or his company Web site:
http://www.whitelightcomputing.com, and read more of his thoughts on VFP in his blog Shedding Some Light
(http://rickschummer.com/blog).
Developer Tools
White Light Computing sells professional developer tools to help Visual FoxPro developers be more productive.
HackCX Professional: Having fun hacking a class or form via the ever trusty BROWSE window? Enjoy rearranging
memo windows each time, manually finding the correct record in the table, making the change, only to discover that
the class or form won’t open in the designer? HackCX Pro is a better editor than the BROWSE window and provides a
safer hacking experience for your forms and visual class libraries. More details here:
http://www.whitelightcomputing.com/prodhackcxpro.htm
ViewEditor Professional: A vastly enhanced version of the award‐winning ViewEditor, ViewEditor Professional is a
replacement for the native Visual FoxPro View Designer. ViewEditor Professional provides support for local and
remote views, views that access free tables, views that access other views, parameterized views, multiple table
updates and Visual FoxPro databases with multiple remote data connections.
View Editor Professional provides a much more efficient interface that makes writing and maintaining views a breeze,
and leverages your skill as a database developer by getting out of your way while you write SQL code, but is there to
help you with the process of setting the numerous properties associated with views. More details here:
http://www.whitelightcomputing.com/prodvieweditorpro.htm
Page 12