Discussion Locked

Access Violation - Installing VB app.

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Running the setup installation for a VB-5 app. I got the following 2 messages:

1. An access violation occurred while copying the file: c:\windows\system\msvcrt.dll

2. An access violation occurred while copying the file: c:\windows\system\mfc42.dll

I will appreciate your help.

5 replies

by gbworld

This is largely a problem with using VB 5 at this point in time. What is happening is that you are trying to install system files. Most likely this is happening on Windows 2000, but I could see a possibility with older versions of Windows, as well.
What happens is that newer versions of install are supposed to check for newer versions of shared and system DLLs before installing. In VB 5, these were newer and not in the standard install of the OS, so VB 5 installed them by default. This errormay not stop your app from running, but I would imagine the VB 5 install does not allow you to ignore and fails instead.

As I have not worked in VB 5 in quite a few years, I cannot give a guaranteed correct answer, but here are some options:

1. Open the install script and remove the install portion for these DLLs.

2. Open the .cab files and remove the DLLs from these files also.

In newer versions of the OS, these are not necessary, so this will not affect your install to remove them.

Gregory A. Beamer
MCP: +I, SE, SD, DBA

by peyison

Your app probably includes a thrid party control that uses these files. The setup program is trying to install them but since they are in use by another program they can't be overwritten. The problem is actually with the Setup Kit in VB5. What it should do is see that the files are in use and ask the user to reboot, and tell Windows when it comes back up to copy the files before any other application can use them.

These are very common files and for most users you can get by without including them with your app. The only time it might be a problem is if a user has a clean machine with not much installed on it yet.

What I would recommend is to create two versions of your setup package, one with the files and one without. Distribute the one without first, and if a user has a problem send them the one with. Or if you distribute from a CD, include the one with the files in a sub-folder, so they have it if they need it.

Hope this helps.

This discussion is closed to new replies.