Visual Basic For Windows (VB/Win)

Frequently asked Questions & Answers
Section IX - B
Part 7

Last-modified: 22-Aug-95


[Preface] [General VB] [Common VB Questions] [Advanced VB Questions] [Calling the Win. API & DLL's] [VB/Win & Databases] [Distributing Apps] [General Tips] [VB for Apps (VBA)]

The following symbols indicates new & updated topics:

Hope this makes it easier for Our Regular Readers ;-)


TABLE OF CONTENTS:

G. DISTRIBUTING VISUAL BASIC APPLICATIONS

G. DISTRIBUTING VISUAL BASIC APPLICATIONS


1. What are some tips for using Setup Wizard?

There were loads of bugs in the setup utilities supplied with VB3. Be sure to get the newest version of SETUPKIT (usually called SETUPK.EXE or -.ZIP). It is available from the sources listed in the beginning of this document, and in the General FAQ. Alternatively, if you have the older versions, you may have to manually remove the line referring to OLE2UI.DLL in the file SETUPWIZ.INI. See later in this document for dates of newest files on ftp.microsoft.com.

Follow the instructions in SETUPK.TXT exactly. The files actually belong in two separate directories. Not placing them correctly can create strange and unusual side effects -- none of them good(!)

Set all involved EXE, DLL and VBX files to Read-Only so that the setup program doesn't modify them. [Charles F. Mulks (21667cfm@msu.edu)] A *very* good tip. Actually, make all executables on your system read-only. If not, you can get a sharing violation if you try to run the same DOS executable twice at the same time. Also, the source code for a SETUP program is *included* with VB3 Pro. It is quite trivial to tailor it to your specific needs.

The question remains: Is SetupWiz good? No! Good enough? Perhaps.

[Top of Page][Table of Contents][Top of FAQ]


2. Are there restrictions on what I can distribute with my VB program?

The documentation tells what parts of the Visual Basic kit you can freely distribute: the VBX files, some DLL's and what the SetupKit includes on your distribution diskettes. Reading software license agreements may be more boring than asking the newsgroup, but is nevertheless a good idea. 8^)

There have been some rumours on the newsgroup that you can't redistribute programs written with VB freely. This is nonsense. All applications created with VB can be redistributed freely without royalties (as long as you don't distribute proprietary external files).

The rumours probably originated when Microsoft announced that they will not sell kits allowing third-party software to include the Visual Basic for Applications (VBA) system.

[Top of Page][Table of Contents][Top of FAQ]


3. What alternatives to setup wizard do I have?

Perhaps the best one is to simply modify the setup app which is supplied with VB. Look in your VB directory for the setupkit\ setup1 directory. There you will find everything you need to do a complete setup program. This sample setup is coded to install a few sample app files and create a program group. You can comment out those lines and change to your files and program mgr. group.

There are also a few global variables you will want to change. All of this is contained in the comments in the code.

Using this, and the distribution information in the manual telling you about which files to distribute with your app will make things much easier than using the setup wizard (IMNSHO). There are also several third party setup products available. [George Tatge (gat@csn.org)]

[Top of Page][Table of Contents][Top of FAQ]


4. Do I need to worry about users who have Progman replacements such as Norton Desktop and PC Tools?

Earlier versions of those products and some others do not respond properly to the DLL commands to create groups and items. More recent versions do. All you can do in this case is to include some information in your readme.txt file that instructs users of those products to shut them down and start up program manager before installing. [George Tatge (gat@csn.org)]

[Top of Page][Table of Contents][Top of FAQ]


5. Can I distribute my app without vbrunXXX.dll?

If you are sure that your users have it or can get it, you can easily distribute your app without vbrunXXX.dll. Simply remove the file from your distribution disk or zip file and and ALSO remove it from the setup.lst file. [George Tatge (gat@csn.org)]

[Top of Page][Table of Contents][Top of FAQ]


6. Why won't my setup program install commdlg.dll et. al.?

There are a couple of DLLs that are almost always in use by windows. Commdlg.dll is the most common example. When faced with this problem, there is no easy way out. The full explanation is several pages long and beyond the scope of this FAQ. The general idea is as follows:

Your setup program will need to create a .BAT file to expand and then copy these files. Then, it will need to shutdown Windows (see ExitWindowsExec API call) and run the .BAT file. Then it will need to restart windows and continue your setup program. Your setup program should delete the temporary .BAT file that is no longer needed. [George Tatge (gat@csn.org)]

[Top of Page][Table of Contents][Top of FAQ]


7. Where do I install VBXs and DLLs?

PLEASE- this is one place where everybody's life is much easier if you will follow Microsoft's recommendations. All PUBLIC VBXs and DLLs should be installed in the windows/system directory! A "PUBLIC" DLL or VBX is any which can be purchased on the open market. In other words, if another VB programmer might possibly use the same VBX or DLL, install it in the system directory.

If you have written private VBXs or DLLs that will never be used by any program but yours, you can install them in the same directory where you install your application files.

There are lots of good reasons for doing this, but it makes a short novel to rehearse them all. [George Tatge (gat@csn.org)]

[Top of Page][Table of Contents][Top of FAQ]



[Next Section][Previous Section]