Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


VB6 and Setup.exe distribution package deployment

Posted on 2006-05-29
Medium Priority
Last Modified: 2013-11-23
I had a few questions answered yesterday about creating packaged setup.exe files for VB6 projects.  But one still remains confusing!!!
I am grateful for the guidance I have received thus far but I think one part was incorrect.  
I was told that I should distribute my VB application with all of the most recent xxxxxx.dll files.  After reading the Microsoft article ID 830761 it appears that the strategy is to first look in the VS6 ‘redist’ folder for DLLs to distribute then if not found it gets them from the system directory.   This means that all redistributable files provided WITH  Visual Basic 6 for redistribution should be used.  If the dll / ocx files required to include are not supplied by Visual Studio then they are selected from the System32 directory.  
PLEASE answer this question only if you KNOW the answer.  
Are VB applications compiled using the dll’s in the system32 directory(most likely) or from the Visual Studio redist directory (less likely I think)?
SO, if the compiled .exe program uses the system32 DLL’s, am I REALL OK distributing the older DLL’s with it?  I am an embedded systems engineer so this windows magic seem odd.  Does the linker really know where to call the functions / objects in the DLL or is it handled with some win magic that I don’t have to worry about (i.e. run time binding or some other form of DLL management)
This would mean that I package my freshly compiled EXE with the following dll’s from VS6 SP6 redist folder.

These files are from the redist folder (in my case)
C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist
ALL OF THESE FILES ARE OLDER than the current system32 dll’s on my machine.
Asycfilt.dll      2.40.4275.1      144 KB (147,728 bytes)
Comcat.dll      4.71.1460.1      21.7 KB (22,288 bytes)
Msvbvm60.dll      1.32 MB (1,386,496 bytes)
Oleaut32.dll      2.40.4275.1      584 KB (598,288 bytes)
Olepro32.dll      5.0.4275.1      160 KB (164,112 bytes)
Stdole2.tlb      2.40.4275.1      17.5 KB (17,920 bytes)
And according to Microsoft article ID 197580, I should also use (from the same folder) the
RICHED32.DLL       4.0.993.4      174,352 bytes

However, I also need to distribute the following ocx’s with my application…

I can only find these ocx’s in the active system directory  C:\WINDOWS\system32 directory.

(Note: ALL of the above files are on the Microsoft ‘OK to redistribute’ list ‘redist.txt’.)
FYI:  I ran a test and this, in fact, appears  to be the scenario created by the Packaging and Distribution wizard.

It just seems weird that I am using some older DLL’s included in my distribution package  even though I compiled (or so I would think) with the newer ones.  By the way,
IF YOU DON’T KNOW please don’t guess! (or at least tell me you are just guessing)  I really need an answer from someone who knows if this DLL distribution schema is really correct. And If not, what is…  
Question by:dannyhop
  • 4
  • 3
  • 2

Expert Comment

ID: 16786871
It's obvious that VB applications are compiled with the dll's and ocx's which they REFERENCED. They can be either the dll’s in the system32 directory(most likely), or from the Visual Studio redist directory.

You can just open your VBP file in notepad/UltraEdit, then find the lines start with "Object" and "Reference", then you can see what the exact files are.

If the full path of the file is not shown in VBP file, you can search the GUID in registry. For example, if there is a line in VBP file like the following:

Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX

Just search "67397AA1-7FB1-11D0-B148-00A0C922E820" by Regedit. After you find the key, view the sub key "InprocServer32" to find the full path of the file.


Author Comment

ID: 16787047
Thank you for the response...  

Inside the VBP file with UltraEdit I see these objects... (no Reference=)
Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; RICHTX32.OCX
Object={648A5603-2C6E-101B-82B6-000000000014}#1.1#0; MSCOMM32.OCX
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Example: When I search for key "648A5603-2C6E-101B-82B6-000000000014"
I find
in Registry Key--->     TypeLib\{3B7C8863-D78F-101B-B9B5-04021C009402}\1.2\0
I see the Value Data: = C:\WINDOWS\system32\COMDLG32.OCX
This tells me these "Object" files are infact used by the compiler so I should clearly distribute them with my Application.
This answeres half of my question!!!    Thank You!

The other half of the question I need answered is...
Which of the VB6 'base dependencies' DLL's are used by the compiler?    

There are two ambiguous choices
Choice 1)
These are the file versions distributed with VB6SP6 in the redist folder.  (Note: These are also the files the P&D Wizzard chooses )
Asycfilt.dll     2.40.4275.1    
Comcat.dll     4.71.1460.1    
Oleaut32.dll     2.40.4275.1    
Olepro32.dll     5.0.4275.1    
Stdole2.tlb     2.40.4275.1    
RICHED32.DLL      4.0.993.4    

Choice 2)
These are the versions that exist in my "C:\WINDOWS\System32\"    directory.
Asycfilt.dll      5.1.2600.2180
Comcat.dll      5.0.2600.1
Msvbvm60.dll (this one is the same)
Oleaut32.dll     5.1.2600.2180    
Olepro32.dll     5.1.2600.2180
Stdole2.tlb          etc...

These two sets of VB dependenciy DLL files have very different versions and I don't see any indicators in the .VBP file (or anywhere else) as to which the VB6 compiler chooses to use.
Any help in solving the remainder of this puzzle?
Thank You!

Assisted Solution

junglerover77 earned 500 total points
ID: 16787463
I'm pretty sure that both versions will work properly with your VB application.

As P&D wizard is a quite old application (it was built in 1998, not very sure), it was designed to deploy VB applications to Windows 98 /Windows 95 systems. In fact, in Windows 2000 or higher versions, those files already exist in the system folder.

So, my suggestion is:
1. If you only need to deploy your application to Windows 2000 or higher versions, you can just remove those dependence files from your package;
2. If you need to deploy you application to Windows 98/95 systems, you need to include the elder versions in your package. There is no guarantee that the newer versions would work properly with windows 98/95.
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.

LVL 14

Expert Comment

ID: 16789251

Take Choice 1)

Those among the 2 looks like OS only files, XP version numbers in them. There is trouble in systems older than XP.


Author Comment

ID: 16790035
jungleover77 and Matti
Most installations in have are WinXP but I do need to be capable of installing this to the older Win98 as well as WinME systems.  I still do not understand that this is a definitive answer to:

'Will the older DLL dependency files ALWAYS work, (Win 98, thru Win XP) even if I compiled with the newer files?

I realize this is old stuff but until I port this app over to .Net - Csharp I will need to support this old stuff.  I have seen evidence of trouble in older systems with choice 2 but it 'SEEMS' OK with choice 1.  I was hoping someone definitively knew how this works in the Win Linking schema.
Thank You,
LVL 14

Expert Comment

ID: 16790349

Redistribute those files which are in the redist folder, You are on safe side.
There is many OS dependency files in NT system (NT 4.0 Win2k XP) which are newer than those on Win98. Installing one of these might trash a Win98 box.

You see whit one look that version 5.1.2600.2180 belongs to XP

>'Will the older DLL dependency files ALWAYS work.....
Normal yes, there is A and W versions of fuctions, so programmer can deside what to use will it work on 9.x or on NT


Author Comment

ID: 16791350
I would assume that the default code page for Windows is the old faithful ANSI.  Since this application contains no 'Wide' types, (just simple RTF)  can I infer by your comment above that ANSI will work on all systems I install if I use choice 1)
LVL 14

Accepted Solution

Matti earned 500 total points
ID: 16791935

Choice 1 will work.
As there is version control on install, it will not replace later files, VB 6 is just a bit old but to prevent any damage on user's system is best to use files from redist folder.


Author Comment

ID: 16792821
junglerover77 and Matti,
I have split points. Together you have answered this well.
Thank You,

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

581 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