Solved

Access violation......

Posted on 2001-08-04
14
518 Views
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?


0
Comment
Question by:hannes1
  • 5
  • 4
  • 2
  • +3
14 Comments
 
LVL 1

Expert Comment

by:fparie
Comment Utility
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).

0
 
LVL 22

Expert Comment

by:CJ_S
Comment Utility
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.

Regards,
CJ
0
 
LVL 2

Expert Comment

by:GregJennings
Comment Utility
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.
0
 

Author Comment

by:hannes1
Comment Utility
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?

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
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.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 100 total points
Comment Utility
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:hannes1
Comment Utility
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.
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
Have you installed the latest SP for VB?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
msvcrt.dll means:
 Micro
 Soft
 Visual
 C
 Run
 Time
 
And scrrun.dll uses it.
0
 
LVL 2

Expert Comment

by:GregJennings
Comment Utility
Maybe in the P&D wizard you could specify that these files get installed to your application's directory instead of the system directory.
0
 

Author Comment

by:hannes1
Comment Utility
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).

Thank
you
very
much.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
You must take care of version issue. Before doing any further, check that first!!
0
 

Author Comment

by:hannes1
Comment Utility
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.

Thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now