[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1719
  • Last Modified:

Run-Time Error 75 Issue in Windows 7 and Vista

Hello,

I had a Windows application created "for-hire" several years ago (when XP was the dominant OS). The application was coded in VB6 and runs perfectly in XP. But in Vista and 7, however, it frequently hits a "Run-Time Error 75: Path/File Access Error" at startup.

When my users hit this error, I've been giving them a "band-aid" fix by telling them to right-click on the icon and "Run as Administrator." Now that nearly everyone is using Windows 7, I'm encountering that problem far too often and I want a permanent fix instead of a band-aid.

I think the problem is related to the 3 ActiveX files that the application accesses. As it stands now, these three OCX files are installed in C:\Windows\system32 by default (and registered as well). The three OCX files are:

RICHTX32.OCX
COMDLG32.OCX
MSCOMCTL.OCX

All of the other auxiliary files are installed in the same folder as the executable, so I don't think they are the problem. Other than that, the application uses some true-type fonts that are included with the installation.

There's got to be an easy way to fix this so I don't have to keep telling my users to "Run as Administrator." Can anyone help me?

Thanks!
0
garyknight
Asked:
garyknight
1 Solution
 
greedjCommented:
Right click on the shortcut > Properties > Advanced > check the box "Always run as administrator > OK > Apply > OK
0
 
nffvrxqgrcfqvvcCommented:
Do you have Windows 7 to use for debugging? The first thing you would want to do is debug on Windows 7. If you don't have access to Windows 7 then you can create a Standard(Limited) account on Windows XP this would be almost identical to the permissions enforced in Vista and later with UAC. Run your code on the limited account and check at which lines it's throwing exceptions .. Here is what you need to look for in your source code for the cause of the errors.

 Check all file operations.
 Check all operations that access the system registry.
 Check all hard-coded paths to locations you don't have write access (Program Files), C:\
 Check all operations that use the Dir() function for possible causes. You don't have permission to access a specific directory.
 The user profile locations have changed on Vista and later make sure you use SHGetSpecialFolderPath() for special locations such as the All User directory.
 When writing files use the All User AppData or All User directories.
 When accessing the registry for *WRITE access only HKEY_CURRENT_USER has read/write access rights. HKEY_LOCAL_MACHINE access rights has *READ permissions only unless running under administrative privileges.
 
0
 
VBClassicGuyCommented:
Error 75 would have nothing to do with where the OCX's are located, you'd get a different error number for that. I have 26 VB6 programs that put the OCX's you mentioned plus many more in C:\Windows\system32, and I also register them. My code hums along without a complaint on anything from XP up to Win7 64-bit.

I think your path/file error is coming from somewhere else. Windows 7 is pretty picky about where you can place and change files now. It doesn't like you fooling around in "Program Files" as much as Windows used to. Plus many other folders. I get around this by doing what I've always done...make a folder directly off the root of C drive and place my program there. I can create, change, delete, etc all files with impunity.

If I were you, I'd look at your code and see what are the first file operations you are doing, and where those files are located.
0
 
garyknightAuthor Commented:
Installing the program on the root of the C drive fixed it. Thanks!!!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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