Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Access violation......

Posted on 2001-08-04
Medium Priority
Last Modified: 2008-03-04
I have boxed a small VB project (VB6) using the Package and Deployment Wizard that comes with it. When I tested the deployment of the packaged setup files I got the following error: "An access violation occured while copying the file" with the file name specified. Even when I reboxed the project without the file specified in the error above the error will now specify a different file.

I got errors on DLL files like MSVCRT.DLL. Although I don't think the file itself has something to do with it (?)

Any solutions?

What about re-installing VB?

Question by:hannes1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +3

Expert Comment

ID: 6351368
make sure the setup is the only thing running... you may be simply locking the file.

files like msvcrt (visual c++ runtime) are usually not needed and just included for installation on systems that may have an outdated version of this file. I have the habit of not including these files (but i also have the luxury of deploying to a controlled environment where i know what is installed on the PCs i deploy to).

LVL 22

Expert Comment

ID: 6351518
Indeed you may not have the project opened in the Visual Basic IDE. Because the IDE will lock the .dll file used. if even then you get the error message I suggest that you reboot your system, open the P&D wizard and have specify the correct project.


Expert Comment

ID: 6351536
If you are testing the deployment on a machine that is not your development system, and it is running WinNT or Win2K, make sure the account you are logged in with has local Admin rights.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 6351820
I did the following with no success:

1. Made sure that Setup is the only major app working.
2. Rebooted my PC.
3. Reinstalled VB.

How can this file be locked? I have used P&D alot before without this problem.

????????????????????? I'm confused. Could it be Windows 95?

LVL 16

Expert Comment

ID: 6352277
It may depends on which OS you are running your setup. I think that Win NT and 2000 don't let you overwrite that dll (since it is used for OS itself).
If problem persist, try to not install it or better, modify setup1.vbp to check if it is already installed, if no install it otherwise no.
LVL 16

Accepted Solution

Richie_Simonetti earned 300 total points
ID: 6352292

Author Comment

ID: 6354186
This is what I have found out:

I have used the Microsoft Scripting Runtime as a reference (which is the SCRRUN.DLL file) which in turn needs the MSVCRT.DLL file (why I don't know). Both of these are found in the system folder and can't be removed or replaced during the installation process. The problem now comes in that when I don't specify these 2 files to be installed, my program doesn't want to work. Either way I am screwed.

What other way is there to read values from a file (like a text file) that I have created?

Godspeed to all people.
LVL 70

Expert Comment

by:Éric Moreau
ID: 6354328
Have you installed the latest SP for VB?
LVL 16

Expert Comment

ID: 6354610
msvcrt.dll means:
And scrrun.dll uses it.

Expert Comment

ID: 6354839
Maybe in the P&D wizard you could specify that these files get installed to your application's directory instead of the system directory.

Author Comment

ID: 6356459
I can't say that I have found the solution and that I have tried everything mentioned. I'll keep trying. I award the points because of your effort to search MS's website (which I hate).

LVL 16

Expert Comment

ID: 6356638
You must take care of version issue. Before doing any further, check that first!!

Author Comment

ID: 6357433
I have dropped Sequence File Processing and I am going to use Random File Prosessing instead which doesn't need any DLL of any sort. With some work I am sure it will do the job. One thing I have learnt from this is to compile and box my work quite often during the coding process.


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question