Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Package & Deployment Wizard: HELP! 2

Status
Not open for further replies.

barrytraver

Programmer
Nov 28, 2000
40
0
0
US
Help!

I used the Package & Deployment Wizard to set up an installation package (for a VB program created with VB 6, professional edition, on a computer running Windows ME), but when I tried to use it to install my VB program on another computer (a prograrm running Windows 95), I got the following error message:

"C:\WINDOWS\SYSTEM\RICHED32.DLL
An access violation occurred while copying this file."

Since there were only two programs in memory (Explorer and Systray) when I started the install program, I can't see why there would be any reason for an "access violation" to occur "while copying this file."

To the warning message, I responded with an "Ignore" rather than "Retry" or "Abort," and the installation seemd to be successful, i.e., the program seems to work fine, but why the error message? (If I give my program to others, I certainly don't want such an error message showing up when they install the program!)

The following additional information may or may not be relevant. When I ran the installation package also on the computer on which I created the program, there too I got a warning about RICHED32.DLL, but this one claimed that there was already a newer version of the file installed on the computer! How can that be, since that was the very computer on which I ran the Package & Deployment Wizard to create the installation package?

Any advice on this situation would be greatly appreciated.

Warm regards,

Barry Traver
 
Hi
When you go through the steps for Package and Dep Wizard it's all too easy to just click "Next", "Next"...

The (i think) second step of the wizard has various options at the bottom of the dialog, one of which refers to Dependency file. For this particular project - the Dependency File option button needs to be selected.

You have to do this because your project is using a control which is not part of "basic" visual basic but is stored in a seperate file - in this case:
C:\WINDOWS\SYSTEM\RICHED32.DLL

As you distribute your app then it may well be that not all your users have this particular file on their system. If a user didn't have a copy of this file (or a different version) then they it is unlikely they could run your program. So, by creating a dependency file a copy of the file (eg RichEd32.dll) is automatically copied and *registered* to the users system.

As to the error messages you got - welcome to the many "features" of VB!
There are many scenarios that cause such errors but basically what happens is at some point in the past a user may have installed a program that also used RichEd32.dll and so a copy exists on their system. But that copy could be a different version to the one you are installing - hence the message. It's not as easy as simply copying "your" file as if it's a newer version as the other program *may* no longer work. Then again it might!

search microsoft's knowledge base - search.support.microsoft.com
about this type of error. They give lots of advice - it's a classic windows problem and there is no easy answer!

Kate

p.s. the installation wizard from microsoft is not the only one around

 
Kate,

Thanks for the comments! I do, however, have some questions for you.

> For this particular project - the Dependency File
> option button needs to be selected. You have to do
> this because your project is using a control which is
> not part of "basic" visual basic but is stored in a
> separate file - in this case:
> C:\WINDOWS\SYSTEM\RICHED32.DLL
>
> As you distribute your app then it may well be that
> not all your users have this particular file on their
> system. If a user didn't have a copy of this file (or
> a different version) then they it is unlikely they
> could run your program.
>
> ... So, by creating a dependency file a copy of the
> file (eg RichEd32.dll) is automatically copied and
> *registered* to the user's system.

I'm not sure I follow. Even though I didn't choose the Dependency File Option, the installation program created did try to install RICHED32.DLL (on both computers!). And the file is included in the SETUP.LST that was created by the Package & Deployment Wizard:

...
[Setup1 Files]
File1=@WSC.txt,$(AppPath),,,3/17/01 1:30:28 AM,24557,0.0.0.0
File2=@RICHED32.DLL,$(WinSysPathSysFile),,,5/7/98 12:00:00 AM,174352,4.0.993.4
File3=@RICHTX32.OCX,$(WinSysPath),$(DLLSelfRegister),$(Shared),6/24/98 12:00:00 AM,203576,6.0.81.69
File4=@WSC.exe,$(AppPath),,,3/19/01 5:27:56 PM,77824,1.0.0.0
...

I don't understand the date (5/7/98), because when I use Windows Explorer to look at the C:\WINDOWS\SYSTEM.RICHED32.DLL file properties, it says that the file was "Modified" on "Wednesday, June 23, 1999, 4:56:14 AM" (it doesn't tell when the file was "Created"). And the computer we're talking about here is running
Windows ME, so I would expect the dates to be more recent (but maybe RICHED32.DLL doesn't come with Windows ME).

Anyway, the installation package created apparently _does_ try to install RICHED32.DLL, so what is the difference between the "Dependency File" choice and the default "Standard Setup Package" which I used (and which also apparently tries to install RICHED32.DLL during installation)?

> search microsoft's knowledge base -
> search.support.microsoft.com about this type of error.
> They give lots of advice - it's a classic windows
> problem and there is no easy answer!

I'll check it out. Perhaps also you or other people may have other suggestions that you may like to post here. (I've used the Microsoft KnowledgeBase before, and at times it has been genuinely helpful, but at other times it has not appeared to contain -- or at least to make it easy to find -- useful information.)

> p.s. the installation wizard from microsoft is not the
> only one around

No, but (since I don't program in VB for a living) it may be the only one I can afford! Or is there a fairly inexpensive installation program available? (Most of the professional VB utilities I've seen run over a hundred dollars, whereas my budget would permit me perhaps $50 at most, and even then only if there was a good reason for the investment.)

Warm regards,

Barry
 
There are three different Riched32.dll files that have the version number 5.0.1458.47, and one of them is not redistributable. This article describes the differences between these files and includes additional distribution information.



MORE INFORMATION
Each of the three Riched32.dll files with the version number 5.0.1458.47, and has a different size. These versions are:


A 169KB version (general release).


A 176KB version that is optimized for loading on Windows 98, but is identical in code to the general release version.


A 225KB version that was released by the Microsoft Exchange group. It is intended to cover all localized versions and is dependent upon GAPI32.dll.


Of these three versions of Riched32.dll 5.0.1458.47, you can only distribute the 169KB or 176KB versions. If the target computer is already using the 225KB version, do not replace it with another Riched32.dll with the same version number or older.

Also, keep the following in mind when distributing Riched32.dll using third-party setup programs:

If the target computer is running NT 4.0, your setup program should not replace Riched32.dll.


Riched32.dll is a part of the operation system installation of Windows 2000. Setup programs installing to Windows 2000 should not install Riched32.dll.


Which Version Is Distributed by the Setup Wizard and PDW?
If you use the Setup Wizard in Visual Basic 5.0 or the Package and Deployment Wizard (PDW) in Visual Basic 6.0, you will not have to concern yourself with the issue of which version to distribute. By default, the Setup Wizard and PDW are set up to distribute Riched32.dll version 4.00.993.4, if your application requires this file. Both wizards create setup programs that only replace files on target systems if they are older than the file being distributed.

Visual Basic 5.0 places a copy of Riched32.dll version 4.00.993.4 in the following folder:

Program Files\DevStudio\VB\Setupkit\Kitfil32\Sys32

This is the folder that the Setup Wizard searches first when pulling in the files that need to be distributed. If your application uses Riched32.dll, the Setup Wizard will pick it up from this location.

Visual Basic 6.0 places a copy of Riched32.dll version 4.00.993.4 in the following folder:

Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist

This is the folder that the PDW searches first when pulling in the files that need to be distributed. If your application uses Riched32.dll, the PDW will pick it up from this location.

Riched32.dll is included in the redistributable file list (Redist.txt) for Visual Basic 5.0. While the file is not included in the Redist.txt file for Visual Basic 6.0, the PDW may include Riched32.dll in the distribution set. However, it will not install the file on a computer running Windows NT 4.0 or Windows 2000.
Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Just a note.. I was using the Package & Deployment app but recently switched to the VISUAL STUDIO INSTALLER found on the Microsoft Website. I am not sure if it is free but if you have an MSDN Universal licence, you can download it for no charge.

It works through Visual Interdev 6.0 and has a piece designed to help set up VB installs.

I used to have so many probelms with dll's on installs, but seems to work much better with VSI.

Check out the Microsoft site for more info on this product.

Mike
 
Eric,

> There are three different Riched32.dll files that have
> the version number 5.0.1458.47, and one of them is not
> redistributable. This article describes the differences
> between these files and includes additional distribution
> information.

Thanks for taking the time to share this information. The first part doesn't seem to apply, since I am not using version number 5.0.1458.47, but rather version 4.0.993.4, dated 5/7/1998, but the rest contains some helpful information. (By the way, I'm also trying to figure out how to update the file -- if appropriate -- to version 5.0.1934.1, dated 6/23/99 -- but another thread here deals with that problem).

> Riched32.dll is a part of the operation system
> installation of Windows 2000. Setup programs installing
> to Windows 2000 should not install Riched32.dll.
>
> ...the PDW ... will not install the file on a computer
> running Windows NT 4.0 or Windows 2000

But what happens with Windows ME (which I'm using, for example)? Does Windows ME work like Window 98 or Windows 2000 in this situation?

> If you use the Setup Wizard in Visual Basic 5.0 or the
> Package and Deployment Wizard (PDW) in Visual Basic 6.0,
> you will not have to concern yourself with the issue of
> which version to distribute. By default, the Setup Wizard
> and PDW are set up to distribute Riched32.dll version
> 4.00.993.4, if your application requires this file. Both
> wizards create setup programs that only replace files on
> target systems if they are older than the file being
> distributed.

If that's true, then I can stay with version 4.00.993.4 (but why not update it to the appropriate file for version 5.0.1458.47??). The problem is that the installation process using the installation package created by the PDW (Package & Deployment Wizard) still produces some rather confusing, annoying, and unprofessional-looking error messages.

I'm primarily concerned about the user who is installing the program on a system running Windows 95 (maybe Windows 98 has the same problem, but I haven't had opportunity to test it on Windows 98).

Specifically, when installing my VB program on a system running Windows 95 (and maybe on one running Windows 98), the following error message is produced:

"C:\WINDOWS\SYSTEM\RICHED32.DLL
An access violation occurred while copying this file."

"Access violation" sounds serious enough that the user may choose "Abort," whereas if "Ignore" is chosen, the program seems to be installed successfully.

Is there any way out of this problem? (If it involves using something other than Microsoft's Package & Deployment Wizard, does anyone have one to recommend?)

Thanks again for sharing some helpful information (even though I still have some significant questions, as you can see).

Regards,

Barry
 
Mike,

> Just a note.. I was using the Package & Deployment app
> but recently switched to the VISUAL STUDIO INSTALLER
> found on the Microsoft Website. I am not sure if it is
> free but if you have an MSDN Universal licence, you can
> download it for no charge.

I don't think I have an "MSDN Universal" (I don't even think I know what it is), but I did purchase an earlier version of Visual Studio (the version that came with VB 5, it may have been called Visual Studio 97, but I'm not sure about that).

When it came to updating Visual Basic this time around, I couldn't afford to update Visual Studio (I'm
not a professional programmer earning a living by programming -- it's more of a hobby), so I settled for Visual Basic alone (professional edition).

So I may or may not be eligible for the VISUAL STUDIO INSTALLER you mention.

> It works through Visual Interdev 6.0 and has a piece
> designed to help set up VB installs.

Oops! When I got my new computer, I didn't install Visual Studio on it, since it was the previous version of Visual Studio (and I had found that I was really only using Visual Basic anyway, as much as I'd like to think I'd get around to learning the Visual languages).

But then again &quot;Visual Interdev 6.0&quot; suggests that you need to have the latest version of Visual Studio (called Visual Studio 6?), which I don't have <sigh>.

> I used to have so many probelms with dll's on installs,
> but seems to work much better with VSI.
>
> Check out the Microsoft site for more info on this
> product.

QUESTION (but a &quot;stupid&quot; one showing that I am not a professional VB programmer): Is there a tutorial (or even sort of a &quot;home page URL&quot; for VB) to help people find VB-related information and/or software on the Microsoft site? (When I've tried to find my way around on my own, I think I've gotten lost more often than not!)

Thanks for your note.

Regards,

Barry
 
Hey Barry,

I guess sometimes I take for granted that my company has the MSDN license. Basically, MSDN Universal subscription is a subscription to all Microsoft products. They actually send every MS product every month or so, most are for testing and developing but this allows us to work on the latest and greatest, such as the .net framework. As you can imagine, it is quite expensive. However, there is a little work around for individuals to get the MS products cheaper. If you have a Student ID/Teacher ID, or have a friend that has one, I would recommend you purchasing the MS Studio 6.0 with this. The price is more then half the normal cost and is exactly the same as the &quot;regular&quot; version. There are many companies that sell the &quot;academic products.&quot; One I have heard of is at
The Visual studio Installer is free, however you need VS 6.0 to download and use. Here are a few links:

MSDN homepage

Microsoft free seminars online training

Visual Studio Homepage

Visual Basic Homepage

Visual Studio Installer info
Free But requires Visual Studio 6 Pro or Enterprise

VB Help forum

VB Help - lots of code

ALL VB stuff

VB and all other languages

No VB but many other great tutorials


Hope that helps some... However, I found this site to be one of the BEST.. 90% of the time my questions are answered by very knowledgeable people.

Best regards,

Mike
 
Mike,

> Hope that helps some... However, I found this site to be
> one of the BEST.. 90% of the time my questions are
> answered by very knowledgeable people.

Yes, it helps a lot! Thank you for taking the time to share the information.

And, yes, I agree with you about the helpfulness of this site. I've posted notes at oher places, such as the Usenet newsgroups comp.lang.basic.visual.misc and microsoft.public.vb.general.discussion, and gotten helpful responses from time to time, but this Tek-Tik forum seems to be the place where I'm most likely to receive helpful and knowledgeable discussion of my questions.

I am at the point, however, where I'm beginning to feel a bit guilty about providing only questions and none of the answers. Now, I'm not a professional programmer -- in fact, I'm not much more than a novice at programming (although this forum is helping me move into the intermediate range) -- but if I should see a question where I may have had some experience, should I venture to post a response? (Or should I leave that to the experts here?)

Warm regards,

Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top