Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Visual Foxpro on local Windows 10 machines, what if any adjustments are needed if I upgrade to Windows 11? 1

dmusicant

Programmer
Mar 29, 2005
253
US
I routinely run FoxPro apps, originally created in FPW 2.6 for Windows, adapted to Visual FoxPro versions up to 9.0. Both my Windows 10 64bit Lenovo P1 laptops have been problematical in that they have stopped being able to access my android phones. Seems to be something about a corrupted INF file. One of the machines, additionally, is incapable of recognizing attached USB hard drives. I figure a reinstall of Windows 10 will probably resolve those problems, perhaps an upgrade but more likely a fresh install. Given Microsoft's declared intention to cease supporting Windows 10 in October 2025, I figure it might be best to install Windows 11 now, either upgrade or fresh installs. Again, fresh a better bet to resolve the issues mentioned, but more work, of course, to install all the apps I have on the machines.

My data is on my NAS and I use mostly one of the laptops, occasionally the other, never both simultaneously.

A quick search indicates I may need to run WOW64 emulator to support VFP 9. This is the first I've heard of that. AFAIK, I'm not running on that emulator now, but maybe it is and I just don't know it.

What am I facing here? Suggestions, explanations appreciated.
 
WOW64 is not an emulator, it's short for Windows32 On Windows64. Also see https://en.wikipedia.org/wiki/WoW64

Every 64bit Windows version since Vista has this included and it means any 32bit applications and DLLs and drivers, etc. run in that 32bit Windows subsystem, it's included, it's not a subsystem in the sense of a Windows XP Virtual Machine that runs applications in compatibility mode in a separate XP Windows session, its native within the same Windows sessions, Windows versions except some core servers are all 32bit/64bit in parallel, CPUs likewise. By starting an EXE built in VFP9 (or indeed any 32bit executable) it runs as 32bit process and therefore in Wow64, you don't do nothing for that and you already do that on Windows 10.

What your problem can be maintainig legacy 2.6 applications, even when they are ported to VFP9 projects is that you still require an even more legacy subsystem of 16bit drivers, dlls, etc. software. Not sure if Win11 is a showstopper, it's mainly just a continuation of Windows 10,8,7,Vista.
 
To run VFP9 on a Win11 machine, whether it's 32-bit or 64-bit, just go ahead. Most likely you won't have any problem. I run the same setup on several machines, no problem at all so far. And no special things to worry about.

The only thing you should be careful about, is not to install VFP9 in the suggested folder, since newer Windows versions have restrictions in the c:\Programxxx folders. Instead, choose a folder that's outside these folders. Personally I always use c:\vfp9.

And if, heaven forbid, you should get any problems, then ask here. I don't expect to hear about any problems, but one can never be more than 99.9% sure.
 
NAS may have issues... if it uses SMB1 run code in a bat file as admin...

Code:
dism /online /get-featureinfo /featurename:smb1protocol | find "Status : Disabled"  && (
echo Enabling SMB1Protocol
DISM /Online /Enable-Feature /All /FeatureName:SMB1Protocol
) || (echo SMB1 Currently Enabled)

dism /online /get-featureinfo /featurename:SMB1Protocol-Deprecation | find "Status : Enabled" && (
echo Disabling SMB1Protocol-Depreciation
DISM /Online /Disable-Feature /All /FeatureName:SMB1Protocol-Deprecation
) || (echo SMB1-Deprecation Currently Disabled)


dism /online /get-featureinfo /featurename:recall | find "Status : Enabled" && (
echo Recall Being Disabled
dism /online /disable-feature /featurename:recall
) || (echo Recall Currently Disabled)
 
Nothing. The problems you report seem to be related to other problems with your machines. I moved from Win10 to Win11 with no problems in my VFP apps. It's more about getting used to the OS changes than anything at all with VFP.
 
Suggestions, explanations appreciated.
Since W07 I use a fuly installed VFP-Environment located on my Systemdrive (i.e. C:\$DEV\VFP09) including all updates/patches. To reinstall it after fresh windows installation i just paste the saved VFP-path into my system and run (as administrator) the required post-settings like
Code:
C:\$dev\VFP09\VFP9.exe /regserver
copy C:\$Dev\VFP09\_OCX\mswinsck.ocx %windir%\sysWOW64\mswinsck.ocx
copy C:\$Dev\VFP09\_OCX\comctl32.ocx %windir%\sysWOW64\comctl32.ocx
copy C:\$Dev\VFP09\_OCX\mscomct2.ocx %windir%\sysWOW64\mscomct2.ocx
copy C:\$Dev\VFP09\_OCX\mscomctl.ocx %windir%\sysWOW64\mscomctl.ocx
regsvr32 %windir%\sysWOW64\mswinsck.ocx
regsvr32 %windir%\sysWOW64\comctl32.ocx
regsvr32 %windir%\sysWOW64\mscomct2.ocx
regsvr32 %windir%\sysWOW64\mscomctl.ocx
C:\$dev\VFP09\_SP2\VFP9SP2RT_CTP
I use a HP ProDesk running W07, W10 and W11

Worked on W10 as well for W11. Woody has posted a comprehensive description about it in a blog.
see there https://woody-prolib.blogspot.com/2021/
 
Last edited:
Instead, choose a folder that's outside these folders. Personally I always use c:\vfp9.
Yes, for developing on Vista or higher, that's necessary, really.

When the installer asks you for an alternative path, you can enter one. I remember it's best to create this directory before installing and then specifying it during setup, because the setup won't create it.

It's also okay to install your own software outside c:\Program Files(x86), too, when you have anything writable, but it's also advisable to stick to that system directory (of course in a subdirectory for your application) and let the setup set permissions for users to enable writing to any ini or other files necessary to write to, especially of course database files. The VFP9 installer does not do that, which means some of the features of the IDE programmed in VFP code within the VFP home() folder when first run cause problems when UAC redirection causes compilation of PRGs into FXP files and other things not being stored within HOME(). Actually, that already was a problem before VIsta, too. UAC write redirection just made it worse. And up to XP you as a deeloper could overcome problems by being a member of the Administrator local group, whereas file write redirection also acts on admin accounts, even the Administrator account. So that's why it only becomes noticeable since Vista.

All that's not new in Windows 11 and is a problem since Vista. The only thing that was a change from Windows 10 to 11 we discussed here in a recent thread was the system dialog for choosing a printer and make printer settings. There's also a lengthy discussion about how to handle that. If you never had problems with SYS(1037) or it's new to you this sys call should display the page setup dialog of Windows, then you can forget about that, too. It's a problem also since Vista, that this changed, there were different workarounds working in different Windows versions. You likely even print in text mode using the ?? ocmmand. or even the shell TYPE file>PRN or something like that, you must have addressed this earlier, it would have the same problems in Win11 as in Win10,8,7, or Vista.
 
Last edited:
One other advice when you encounter problems in a new installation on Windows 11: Verify, if you don't get the same problem on Window 10 or lower. I have expeerienced problems due to lack of documentation of necesssary settings and the best point to do anything that is needing administrative permissions to chang is to do it programmatically during setup. Which means by using the features of a setup tool like Installshiled or inno setup. Get to know how to set user permissions on to be installed files. Get to know how to write registry keys you need for your software or to register ActiveX controls and anything else needing adminstrative permissions, because it won't be sufficient for users to have administrative rights.

Again, that's a problem since Vista, up to XP you could just advise to run your application with user accounts having admin permissions and procedures you do at first start in your application could do things only admins can do, or you generally rely on that. You should not need admin permissions to run a software unless it is an adminstrator tool. Any such things need to be able to be done by a basic, normal, restricted user account or, what's necessary to have elevated permissions needs to be done by a setup. And even though Inno is enabling to do more than the express edition of Installshiled coming with VFP7-, it won't allow you to run VFP code within the setup, you have to learn to use inno scripts or settings to get permissions and registration of ActiveX or your own COM Servers, etc. done.

There's no replacement of a good documentation of the necessary manual steps to do, if there are, but even better make all of that automatic and done by a setup, then you also have to worry less about an OS update or reinstallation. Principles of permissions stay the same, if normal users are enabled to write to files, for example, nothing new like the degradation of admin permissions or UAC redirections can hit you. That was and is always true, not only since about 20 years.
 
Last edited:
No new problems
As woody has written (see Post from ein terraner) you may simply copy your vfp - folder to new machine (but not in a system folder , see above , something like c:\fox or d:\develop)
Then install the runtime from vfpx
Start it once with VFP9.EXE /REGSERVER

Thats it
Tom
 

Part and Inventory Search

Sponsor

Back
Top