garyknight
asked on
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!
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!
Right click on the shortcut > Properties > Advanced > check the box "Always run as administrator > OK > Apply > OK
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Installing the program on the root of the C drive fixed it. Thanks!!!