The organization I work for is facing a big problem with their management system, a modular application developed in VB in 1997/1998. Despite being functional on Windows 7, it has not been migrated to a more modern development platform such as VB.NET.
Now, due to security concerns, we need to install the system on Windows 10. However, there are several issues that have arisen. When run without compatibility with Windows 7, the main application launches sub-applications that throw a ‘
Runtime Error 53: file not found‘ without specifying which dll is missing.
Other sub-applications do not open at all. We have already checked that the libraries are registered. When run with compatibility with Windows 7, the ‘Runtime Error 53’ seems to disappear but the program then issues a warning indicating that it was not possible to copy some files to the special folder UserProfile, with a detail of ‘
Runtime Error 52: Bad file name or number‘.
I’ve tried running the application on both 32-bit and 64-bit versions of Windows 10, but the program failed and it even seems to perform worse on the 32-bit version. I also attempted to disassemble the code, but the error appears to be related to resolving routes of special folders like ProgramFiles and UserProfile.
I suspect it may be due to some shell and architecture problem, but I’ve also tried running the application in administrator mode and changing permissions of special folders without success.
I am considering virtualizing Windows 7 within Windows 10 as a last resort, but would like to explore other options first. I am currently stuck and seeking any suggestions.
Visual Basic 6 (VB6) was a popular development platform released by Microsoft in 1998. It was widely used to build Windows desktop applications, and many organizations still rely on legacy VB6 applications to run their business. However, with the release of Windows 10, compatibility issues have emerged, making it difficult to run VB6 applications on modern operating systems. In this blog post, we will discuss the compatibility issues faced by a VB6 application on Windows 10 and explore possible solutions to resolve them.
Runtime Error 53: File Not Found
One of the most common issues faced while running VB6 applications on Windows 10 is the ‘
Runtime Error 53: file not found‘ error. This error occurs when the application launches sub-applications that require specific DLL files that are not present in the system. However, the error message does not specify which DLL file is missing, making it difficult to identify the root cause of the problem.
To resolve this issue, you can try registering the required DLL files manually using the Regsvr32 command-line tool. To do this, open the Command Prompt as an administrator and navigate to the folder where the DLL file is located. Then, type the following command:
regsvr32 <DLL file name>.
If this does not work, you can try using a dependency walker tool such as Dependency Walker to identify the missing DLL files. This tool scans the application and its dependencies and generates a report of missing DLL files. You can then download and install the missing DLL files from Microsoft’s website or other trusted sources.
Runtime Error 52: Bad File Name or Number
Another common issue faced while running VB6 applications on Windows 10 is the ‘
Runtime Error 52: Bad file name or number‘ error. This error occurs when the application tries to copy files to the special folder UserProfile, but fails due to permission issues or invalid file names.
To resolve this issue, you can try running the application with administrative privileges. Right-click on the application executable file and select ‘Run as Administrator’. This will elevate the application’s permissions and allow it to access the UserProfile folder.
If this does not work, you can try changing the permissions of the UserProfile folder. Right-click on the UserProfile folder and select ‘Properties’. Then, click on the ‘Security’ tab and select the user account that you want to grant permissions to. Click on the ‘Edit’ button and select the permissions that you want to grant. Click ‘Apply’ and ‘OK’ to save the changes.
32-bit vs. 64-bit Compatibility
VB6 applications were designed to run on 32-bit operating systems and may face compatibility issues when running on 64-bit operating systems such as Windows 10. To resolve this issue, you can try running the application in compatibility mode. Right-click on the application executable file and select ‘Properties’. Then, click on the ‘Compatibility’ tab and select ‘Windows 7’ from the drop-down list. Click ‘Apply’ and ‘OK’ to save the changes.
If this does not work, you can try installing the 32-bit version of Windows 10 and running the application on it. However, it is important to note that the 32-bit version of Windows 10 has limitations in terms of memory and processing power, which may affect the performance of the application.
Virtualization as a Solution
If all else fails, virtualization can be considered as a last resort. Virtualization allows you to run an older operating system such as Windows 7 within a virtual machine on Windows 10. This allows you to run the VB6 application on Windows 7 without having to downgrade your primary operating system.
To set up virtualization, you can use virtual machine software such as Oracle VirtualBox or VMware Workstation. Install the virtual machine software and create a new virtual machine with Windows 7 as the guest operating system. Then, install the VB6 application within the virtual machine and run it from there.
However, it is important to note that virtualization requires additional resources such as memory and processing power, which may affect the performance of your system. It is also important to ensure that the virtual machine is properly configured in terms of network connectivity, storage, and security.
In conclusion, running VB6 applications on Windows 10 can be challenging due to compatibility issues. However, by following the solutions discussed in this blog post, you can resolve these issues and run your VB6 application on Windows 10. It is important to note that while these solutions may work for some applications, they may not work for all. If you are still facing issues, you may need to consider migrating your application to a more modern development platform such as VB.NET.
It sounds like the VB6 application you are trying to run on Windows 10 is encountering compatibility issues. One potential solution to this problem could be to use a compatibility mode on Windows 10 to run the application as if it were on Windows 7. However, it seems that this is not fully resolving the issues you are encountering.
Another option you could consider is using a tool such as the Microsoft Visual Basic 6.0 Migration and Upgrade Wizard to convert the VB6 code to VB.NET. This would allow you to run the application on a more modern development platform and potentially resolve the compatibility issues you are experiencing.
You can also try upgrading the application to use the latest version of VB6 which is version 6.0 Service Pack 6, which includes a number of bug fixes and security updates.
Lastly, another option is to run the application on a virtual machine running Windows 7, as you mentioned. This would allow the application to run in an environment that it is known to be compatible with, and could resolve the issues you are experiencing.
It is important to keep in mind that the solution that works for you may depend on the specific errors and issues you are encountering, as well as the complexity of the application and the resources available to you.
Based on my experience, Windows 10 has not caused any unique issues compared to Windows 7. However, it’s important to note that different applications may have varying compatibility.
When encountering problems, it’s best to check for installation or configuration issues before assuming compatibility issues. As for the 52/53 errors, they could be related to permissions or drive mappings. To troubleshoot these errors, try using Process Monitor to detect any missing or not found elements.