Dienstag, 11. Dezember 2018

How to install VFP9 in a modern world

(This is the translation of my german blogpost from http://woody-prolib.blogspot.com/2010/01/vfp9-komplett-installieren.html)

Since there have been a lot of requests about this in the forums lately, here is a list of all necessary steps to set up a VFP9 from 2004 on a virgin Windows of today. Switching to Windows 10 is usually the typical reason...

First, of course, Windows itself should be completely up2date, i.e. run the Windows update functionality until nothing more is reported. Of course the setting should be set to "For Windows and other MS products" so that Office etc are also updated. In Win7 please have a look at the optional updates. I always hide all further language updates (mark all and then right mouse click), as well as the bad MS LIVE stuff....

Here's the shortcut for those in a hurry: VFP can be moved from the old to the new computer in no time at all by simply copying the entire development folder from the old computer and then starting VFP with the addition "/REGSERVER" once with admin rights (!). The easiest way to do this is to click on "RUN (as Administrator)" in the "Right-Mouse-On-Windows-Start" menu ; then switch to the VFP directory and type in VFP9.EXE /REGSERVER and start it (If a message appears "Access to system registration denied", then it was without admin rights, and you can do it again).   This option rewrites all file associations so that a double click on e.g. a DBF starts the VFP and displays the table in a browse.

By the way, there is another tool to clean up or reset VFP settings:  DO HOME() + "VFPCLEAN.APP" checks the VFP internal mappings in the options dialog (paths to Genmenu, ReportEngines etc) and corrects them.

Depending on already installed other programs it can be that such a copied VFP then already starts without complaint, mostly however then the MSXML2 libraries or the (at that time current, but in the meantime age-old) OCXe for Treeview, Listview etc. are missing, which are no longer standard in the current Windows, but which VFP uses for the display of the TaskPane or IntellisenseManagers etc..  We'll get to them in a moment, but let's go one step after the other....

So: The easiest way to make any computer VFP compatible, is to use my runtime installer: At https://github.com/VFPX/VFPRuntimeInstallers you can find the appropriate installers for all common VFP versions. For VFP9 this would be the VFP9SP2RT.EXE and then the XML2 stack as well as ODBC and OLEDB are now available.

By the way: I do this "copying over" several times a year, because I often set up a new disk, be it to test new Windows versions or to get a totally dirty computer up and running again. I have installed all FoxPro versions (starting from FoxBase+ over FoxPro1, 2, 2.6 for DOS and all Windows versions) parallel and executable in a folder D:\Develop\. In the main directory there's a batch, which executes this /Regserver in the correct order (older versions first), so that always the latest version is registered as the last one. (Attention: the /RegServer does not do this until VFP6, in VFP5 it was still "-R"). VFP3 doesn't run without tricks on today's computers anymore, because we all have too much RAM (VFP3 can handle max 512MB RAM by default, SP1 had extended it to 738MB; for that time an impossible value!) A  possible Way out in Win7: Run in virtual XP mode, because this VirtualPC is configured to 256MB by default.

But back to the topic... Beside this "simply copying over" for Lazy Joe ;) of course a clean new installation should also be possible. Starting with Windows 7 we are confronted with two problems, which are not VFP specific, but sloppiness of the used installer. So you start normally with inserting the CD or an ISO image. Attention: do not execute the SETUP.exe directly, but the VFPSTART.HTA.

After entering the key (which, by the way, is the same all over the world), you come to the path selection. To install in "c:\Program Files\" folder should be awarded with the "Bozo of the year" for various reasons (development systems are not pure "only executable" end user programs), so you should install them outside of this especially monitored and restrictive folder branch. (In my case I install to \Develop\). 
But that MS installer is somewhat stupid: You can't visually select a new directory when installing, the installer dialog remains empty. Remedy: First create the corresponding target directory with the Explorer, and then simply type in the path in the installer.

But the installer doesn't install all the essentials for VFP9. After the setup has installed everything in just about 3 minutes (a relief compared to the several hours of a Visual Studio installation!), you return to the start screen, which then displays the option for the service packs.
In essence, this page forwards you to: http://msdn.microsoft.com/de-de/vfoxpro/bb190232(en-us).aspx . There you should install the Servicepack2 and the "GDI+ for SP2" first of all. The option "XSource for VFP" (xSource.zip contains the source code of all wizards and wizards) we get via VFPX in a newer version, as well as VFPCOM and the help file. The ODBC driver is not loadable anymore, but the ODBC (and the OLEDB) is still installed by the runtime installer mentioned above.

According to Microsoft's unimportant opinion everything is done now... Bad mistake! Unfortunately the reference to the absolutely necessary Hotfixes, which correct some errors found after publication of SP2, is missing here.
If you look at Microsoft's Knowledgebase for "FoxPro", you will find three Knowledgebase entries, each of which has a hotfix for download piggybacked (hidden behind the "Downloads" tab). Microsoft writes that you should install all hotfixes one by one... But don't despair: Only the newest one has to be installed, it also contains all other, older hotfixes. So at the time of this article, the latest hotfix is the revision number 9.000.7423. Unfortunately, this is no longer hosted in the download portal, but can now also be found at https://github.com/VFPX/VFP9SP2Hotfix3 .
Download it and run it; you will be asked for a directory again. For once, do not select the VFP installation directory, but specify a temporary directory (e.g. \Develop\VFP9Hotfix\). Then read the Readme.txt and copy the files according to the instructions (in principle the MSM into the installer directory, the rest into the VFP directory). Some daring people install the hotfix directly into the VFP9 directory, then everything is overwritten. ;)

No matter how, but at the end VFP9 should have at least the version number 9.00.0000.7423 or higher.

Then there are still the other options on that VFP9 setup start screen: I strongly advise against installing the Installshield Express. On the one hand that company is no more (it was bought by Symantec, and so it's a no-go for me (nothing yellow on my computer!)), and on the other hand there's InnoSetup, an excellent OpenSource product. For more information see http://fox.wikis.com/wc.dll?Wiki~InnoSetup

The Soap3 samples and the SQL Server 2000 Desktop Engine are not needed either. It is better to install the SQL Server 2014 or 2017 Express version if you want to experiment with SQL Server. (https://go.microsoft.com/fwlink/?linkid=853017)

OK, finished with installing, finally we will start! VFP9 is stored as a simple icon in the Windows start menu, from there you can place it directly into the taskbar in Windows by right-clicking and "Attach to taskbar". And off you go...

Duuuh.... The first start of VFP9 then brings the "Task Pane Manager" window with the dull error message "0: Class definition MSXML2.DOMDOCUMENT.4.0 is not found". Excellent!  For unknown reasons the VFP9 setup doesn't install everything you need. Now you can argue about the sense or nonsense of the Taskpane, but (un)fortunately VFP does more with XML than just that. You can get the missing XML parser into the system in three ways:
a) the official download at MS: https://www.microsoft.com/de-de/download/details.aspx?id=19662
b) by installing our VFP9 runtime installer mentioned above. Since you will need it later on for customer installations, I tend to recommend this download in any case.
c) By installing the SOAP3 setup from the VFP9 CD, which is no longer automatically executed by the main setup under Vista and Win7. This includes the SOAP3 client as well as the XML installer... You can find it under CD:\SoapToolkit\soapsdk.msi.
But since both the Soap Toolkit and the XML4 are now available in more recent versions, I recommend downloading the current versions individually (option a). Oh yes: The soapy thing can be found here: https://www.microsoft.com/en-us/download/details.aspx?id=15489 . You should also install it, so that the Taskpane can display the latest news from http://www.foxcentral.net/ as well.

Next start the Intellisense-Manager or the tasklist  in the Tools menu. If they start without errors, then the usual standard OCX controls (Treeview, Listbox etc.) are still available. If it bombs out, then quickly download the OCXe here:

Ok, but now? Nope. I still have one ;)
Off to www.VFPX.org, the open source community for VFP. Here you can find everything you need for your daily use:
Absolutely necessary: The working help file (because the one from SP2 is broken, there are over a thousand links not there etc.) Direct download: https://github.com/VFPX/HelpFile
If you work with SourceControl (e.g. that horrendous Visual Sourcesafe or Sourcegears excellent VAULT), you should replace the supplied scctext.prg with scctextx (https://github.com/VFPX/AlternateSCCText) .

Otherwise "Highly recommended" but not essential: the new PEM-Editor and the improved Reporting Apps. And of course Thor...  And the various updated parts of XSource (https://github.com/VFPX/XSource )

But now nothing gets in the way of a successful start. Have fun and enjoy the ease of VFP!

Translated with www.DeepL.com/Translator

1 Kommentar:

Carly Vineberg hat gesagt…

Extremely Well structured blog . Your knowledge and expertise really helped me out . High Value Content on topic of Windows Versions . Thanks again for your energy boost!! God Bless!