Access violation......

Posted on 2001-08-04
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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


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 100 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

615 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