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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual FoxPro 5.0 Program doesnt open in Windows 10

Status
Not open for further replies.

Jordan247

IS-IT--Management
Mar 24, 2022
7
US
Hi guys i have a question for you i have this program that was built in visual foxpro 5.0 by another company that is no longer around the program installs just fine but when i try to open the EXE it just says it cant update the system files when it try's to open and when you click ok it closes. it runs just fine in windows 8.1 just not in 10. If anyone here can lead me in the right direction of getting this program to work in windows 10 i would greatly appreciate it. thanks.

Here is a screenshot of what the program displays when trying to open the program
Screen_Shot_2020-10-21_at_4.57.45_PM_wtyewx.png
 
Hi,

Perhaps this program stores files / databases in a folder under ProgramFiles (x86).
This is no longer allowed for some time in newer Windows releases, so just check where the data are stored.

Perhaps you can find a table somewhere with application settings, you can change manually?

Regards, Gerrit
 
I agree with Gerritt. Starting with Vista, Windows has been very fussy about creating or writing files in directories under Program Files or Program Files (x86). The problem here is that VFP is trying to write to the resource files (FOXUSER.*), which by default it locates in the directory from which you launch your executable.

The simplest solution would be to re-install your application in a director that is not part of Program Files or Program Files (x86).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I tried moving the program to the user folder and its the same thing and same error this is what contains in the folder that houses the program
Screen_Shot_2022-03-24_at_11.04.42_AM_y1uyb6.png
Screen_Shot_2022-03-24_at_11.15.49_AM_rwfi4n.png
 
First question is whether you have the appropriate VFP runtimes installed. Try putting them in the folder with the EXE.

Tamar
 
Its stored on a server that has the program on it then once the program is installed on a workstation it puts it in the program files x86 folder. I have tried installing it to a different folder but with no luck just the same error. When i install it on windows 8.1 it installs just fine and launches the program without any errors.
 
Sorry, I didn't read all here, but I think your last post is good info. As it tells me this hasn't to do with the UAC and redirections that Windows does since Vista.

There isn't so much changes from Win 8.1 to Win10.

The caption "Printing Management System" is the application title?

The question is which system files this message means, there are very many system files related to Windows, related to VFP - also at runtime - and maybe as this is about printing management it's perhaps about Windows and more precise about printer related system files. There's no further message telling you which file(s) it wanted to update?

Sysinternals Procmon could help here to find out. Files not accessible or simply not found. It's a bit of a steep curve to explain how to use this tool in a single post. As a starter go for it at
The screenshot already tells a lot, filtering the monitoring of the psmain.exe I think you'll be able to see which file(s) it wanted to access before the error message.

Chriss
 

Does that tools monitor the whole program and my question does the program need to be running when I launch the vfp program
 
Yes you run the procmon tool first, you add a filter to especially list things done by psmain.exe and when the messagebox with the error appears I guesa you'll find file access entries about the files that are either missing or not accessible.

PS: Procmon is a follow up of Filemon and Regmon and it monitors Win API calls, File access and registry access. Especially file access is interesting in your case, isn't it?

Chriss
 

Is there a way i can send this to you via email
 
Nope, first filter out events like CreateFile when the result is not SUCCESS.

Chriss
 
Also, compare what ProcMon outputs for a simpler VFP EXE, like a pjx with only this main.prg:

Code:
ON KEY LABEL ALT+F4 CLEAR EVENTS
READ EVENTS

This will result in a window with standard sysmenu and nothing happening, unless the EXE can't create/write Foxuser.dbf and errors for that reason (but that's not your error message) and unless no runtime DLLs are missing. a VFP5 EXE will surely have a different "fingerprint", but quite similar. If you kill psmain.exe when the message appears procmon will also not register more events, so the important failing CreateFile event will be near the end of what Procmon records for psmain.exe. Notice though, that in the context of Procmon "near the end" isn't necessarily just in the last 5 lines or so, depends how good you filter on the one side and how much of psmain.exe runs before the message comes up. You'll see this even is a lot with an EXE that barely does anything.

Also note that CreateFile is a Windows API call that can of course be used to create files, but also just to open files:
Chriss
 

Here are some screenshots that were ran when i tried to open psmain.exe

Screen_Shot_2022-03-26_at_7.31.27_PM_inmc6b.png
Screen_Shot_2022-03-26_at_7.32.09_PM_aklvet.png
 
All entries with result "SUCCESS" are unimportant.
There are only veray scarse cases of not found DLLs, but nothing that poits to system files that would be considerable for updating, remember the error message says it wants to update some system files.

myslef said:
filter out events like CreateFile when the result is not SUCCESS.

Click on the funnel icon of the toolbar and then pick Where [Result] [is not] and enter SUCCESS, then [Add].
This will have much more relevant entries. The important one is not on screen for you're overwehelmed with the unimportant records that are SUCCESSful.
What are we looking for? An errror, right, not a success.


Chriss
 
There's one more simple thing you can try: Run psmain.exe (not just the setup of it, the installed application) as Administrator. In Windows Explorer navigate to the application installation directory, right click on the psmain.exe and click the menu item with the shield symbol and "Run as Administrator".

If you're not in the account group of (local) Administrators on your PC, then you'll be prompted for a password, of course.

If it's about insufficient privileges on the system file that would solve it. And if that runs, perhaps have a look into the Win 8.1 installation that's working (if you still have that) and look into properties of it, whether it is configured to run as admin, because that's an option you can set to an EXE so just starting it automatically uses that start option. And, well, a setup could make that setting, but it may be a manual step you forgot.

More general, do you have a setup instruction other than just "click setup.exe"? Because in cases like system tools, I would expect some manual steps as admin to be needed despite the fact an installer has admin privileges during the setup and could do such steps itself. If the developer used ISE (InstallShield Express), a version of a setup builder, that has limited features and could mean manual steps necessary after a setup. Edit: Even more so for a VFP5 application, as that didn't even come with a usual Windows setup builder but the VFP "Setup Wizard", which had less features.

In short: You might expect too much of the installer to give you an application that works without further manual configuration steps. If you've not done the Win 8.1 setup it may be worth asking whoever did that to see if he/she remembers if such steps were needed.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top