Sunday, November 29, 2009

VFP 5 on Windows 7 Issue

This past week I was contacted by someone who attended one of my sessions at Southwest Fox and asked me for some help with a problem he was having getting an application and even the VFP 5 IDE to run on Windows 7. The error he was getting: "error initializing application object."

According to the developer the VFP Help indicates the message relates to some kind of problem with the registry.

To me it sounded like a rights issue. I recommended he try to run VFP 5 as an administrator and see if the message disappeared. My thinking on it was the problem happens because the user does not have rights to modify the registry. VFP would probably succeed running as an administrator. Sure enough it worked for him. What I am not sure is if this is a "run once and it is fixed for all users" (machine level registry entries) or you have to continue running as an administrator.

I have not been able to reproduce this behavior in a virtual machine. VFP 5 worked for me the first time. I don't recall this problem showing up on Vista either. Anyone else have experience with this? I only have one application still using VFP 5 runtimes (never needs updates or changes) so I am slightly curious in case my customer decides to upgrade to Windows 7.



At 11/30/2009 06:25:00 PM, Blogger Bob said...

Strange. The only think I can think is that it was trying to create a foxuser.dbf file in a place win7 doesn't want you to write to.

Not sure why you couldn't duplicate it though.

At 11/30/2009 06:52:00 PM, Blogger Rick Schummer said...

No, this is strictly a registry problem. Apparently once you run as an administrator the problem disappears even for the non-administrators. I may have run as an administrator in my initial testing. If this is the case it is a simple workaround.

At 12/02/2009 04:29:00 AM, Anonymous Anonymous said...

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver para o Microsoft Visual FoxPro - Add write permisson for user (Sorry, my english is bad)

At 12/02/2009 06:49:00 AM, Blogger wOOdy said...

When VFP runs the first time, it needs to create that initial Registry entries, if it doesn't find them. As you know, the moniker "application" (which is the same as the _VFP objectreference) is referring to the COM-object side of VFP (This means: everytime you're acccessing _VFP, you're talking with VFP from the outside.) But for registering COM-objects you have to be an administrator, thus that's why the initial first start of VFP has to be in Admin mode. In WinXP most users have been administrators by default, thus you didn't noticed that requirement, but with the now enforced security levels of Vista and Win7, you need to explicitely switch the app into admin-rights.

At 12/03/2009 06:11:00 PM, Blogger rohan said...

Hi Rick,

I was trying to find out someone who could guide one of my customers on their Foxpro Usage. Is there materials available on the internet that could help handle their environment with more ease.

Kindly let me know if you could shed some light.

Rohan Thampi

At 12/03/2009 06:46:00 PM, Blogger Rick Schummer said...


There are a lot of materials on the Internet. Contact me via my Web site to discuss in finer detail.


At 2/24/2010 01:39:00 AM, Anonymous Anonymous said...

fn is a field name of table tn.
before this code can work correct

sele tn

but, on windows 7
it can't work unless you express clearly like this


anyone encounter same problem like me?


Post a Comment

<< Home