Access violation......

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?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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).

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.

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.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

hannes1Author Commented:
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?

Richie_SimonettiIT OperationsCommented:
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.
Richie_SimonettiIT OperationsCommented:

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hannes1Author Commented:
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.
Éric MoreauSenior .Net ConsultantCommented:
Have you installed the latest SP for VB?
Richie_SimonettiIT OperationsCommented:
msvcrt.dll means:
And scrrun.dll uses it.
Maybe in the P&D wizard you could specify that these files get installed to your application's directory instead of the system directory.
hannes1Author Commented:
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).

Richie_SimonettiIT OperationsCommented:
You must take care of version issue. Before doing any further, check that first!!
hannes1Author Commented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.