• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1618
  • Last Modified:

Runtime error 76: path not found error VB6 program on Windows 7

I have an older VB6 program that works fine on XP but gives a File Not Found error on Windows 7.
I'm trying to figure out how I can determine what path/file it is trying to access in order to try and resolve the issue.

Would anyone know how I can determine exactly what it is looking for but can't find?

I do not have the source code, only the compiled exe.

Thanks.
0
asantia
Asked:
asantia
1 Solution
 
it_saigeDeveloperCommented:
If you are not getting a log file, WER (windows exception report) or Event Log entry, then you could use the Process Monitor from the Sysinternals library in order to determine which file the program cannot find.

http://www.howtogeek.com/school/sysinternals-pro/lesson5/all/

-saige-
0
 
Lee SavidgeCommented:
My guess is that it is the user profile. In XP it was under documents and settings and in Windows 7 it is under Users. These should be referenced by the %USERPROFILE% environment variable so Windows does the translation for you.

There is a function that returns the values in environment variables, and if memory serves it is a variant so you should cast it to a string. The function is environ()

Although this page shows VBA code in Excel, it shows how to list out all the environment variables:

http://www.wiseowl.co.uk/blog/s387/environment-variable-vba.htm

It would be the user profile directory location change is your problem though. If not, it will be another special directory location change.
0
 
asantiaAuthor Commented:
That worked, thanks.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now