jrsoftware.org // Jordan Russell's Software
-Home

Products

-Inno Setup


-Toolbar2000

-Toolbar97

-StripReloc

-More...

Support

-Newsgroups

-Contact Me

#######
visitors since
Jan. 1998

Inno Setup Knowledge Base
Return to index

HOWTO: Install Visual Basic 6.0 Applications

Article Created: 2003-10-22 08:22 GMT by Jordan Russell
Last Updated: 2006-10-10 01:54 GMT by Jordan Russell



Installing the VB system DLLs

NOTE: These instructions are only valid for Inno Setup 3.0.5 and later. If you are using a previous version, you must upgrade first.

Inno Setup is capable of installing the system files required by Visual Basic 6.0 applications.

First, you need to download the Visual Basic system files and unzip them:

Filename Date Size Description
vb6sp6sys.zip 2004-04-01 1,133 KB Visual Basic 6.0 (Service Pack 6) system files.

(Source of files)

md5sum: 937de92d296aa7e5d8ab233bb71eb989

Then, copy and paste these lines to the top of your script's [Files] section:

Put all other files pertaining to your application after the "end VB system files" line, including any OCX's used by your app.

Never pull in any of the VB system files from your own Windows System directory. If this advice is ignored, you risk potentially causing DLL version conflicts (like this one) on users' systems.


Administrative privileges are required

In order for the files with the restartreplace flag to install successfully on Windows NT/2000/XP, the user must have administrative privileges. By default, Inno Setup installations do not check for administrative privileges. It is recommended that make your installation script check for this, by setting the PrivilegesRequired [Setup] section directive:

[Setup]
...
PrivilegesRequired=admin
...

If this is not done, and the user doesn't have administrative privileges, an "Access Denied" error message will be displayed during the installation.


Installing OCXs

OCX files can be installed with a [Files] section line like this:

Source: "ComCtl32.ocx"; DestDir: "{sys}"; Flags: restartreplace sharedfile regserver

Note: The above is one line.


Translating a SETUP.LST file created with the P&D wizard

The following information was supplied by Michael Reitz.

  1. Use the P&D wizard to generate the Setup.lst file.
  2. Look through the Setup.lst file and do the following:
    • Use the suggested "VB system files" entries from above for the [Bootstrap Files] section. You don't need to include xxxSTKIT.DLL (i.e. VB6STKIT.DLL).
      The VB6xx.DLL (i.e. VB6DE.DLL) contains the "International Resources for Visual Basic Environment". You may include it in your installation for getting VB error messages and some VB standard dialogs in your native language.
    • Create [Files] section entries for all rows of the [Setup1 Files] section, translating the VB constants/flags using the following rules:

      $(AppPath) {app} constant
      $(WinSysPathSysFile) {sys} constant
      $(WinSysPath) {sys} constant
      $(DLLSelfRegister) regserver flag
      $(Shared) sharedfile flag
      $(TLBRegister) regtypelib flag
      $(MSDAOPath) {dao} constant
      $(EXESelfRegister) use the [Run] section for "MyApp.exe /RegServer"
      use the [UninstallRun] section for "MyApp.exe /UnregServer

  3. Check the REDIST.TXT files (which come with your developer tools) for information about which files you are allowed to redistribute.

Revisions to this Document

2006-10-09:

  • Added OnlyBelowVersion: 0,6 parameters to each line to prevent Setup from trying to install the files on Windows Vista. All of the files come preinstalled on Vista already, and cannot be re-registered due to security restrictions on the registry.

2004-11-07:

  • Removed obsolete comments, as well as the instructions for VB 5.0.

2004-04-01:

  • Updated the Visual Basic 6.0 zip file to Service Pack 6.

2003-10-29:

  • Updated the Visual Basic 6.0 zip file with the new msvbvm60.dll file from the Microsoft KB article 823746.

2003-09-03:

  • Removed CopyMode: alwaysskipifsameorolder from each of the lines since it's the default behavior in Inno Setup 3.0.5 and later.
  • Replaced the obsolete AdminPrivilegesRequired=yes setting with PrivilegesRequired=admin.

2001-10-10:

  • Added sharedfile flag to all the files, since some other installers incorrectly use shared file counting on them.

2001-07-15:

2001-06-22:

  • Removed ctl3d32.dll from the files list, because as it turns out the file was an NT-specific version. It's not needed anyway for Windows versions since 95.

2001-05-19:

  • Various updates.

2001-03-07:

  • Added link to VB 6 SP5 files.

2001-02-13:

  • Added link to VB 6 SP4 files.

2000-03-25:

  • Added section about setting "AdminPrivilegesRequires=1".

2000-03-23:

  • Added a download link for the VB system files in case you don't have them.

1999-12-19:

  • Minor tweaks, added footnote about DLL version conflicts.

1999-09-23:

  • I added the flag restartreplace to the file StdOle2.tlb. It is highly recommended you make this change in your installations too. One person reported to me that restartreplace was necessary on his system for the install to succeed. You will need Inno Setup 1.12.11 or later to be able to use both restartreplace and regtypelib.

Site contents Copyright © 1997-2012 Jordan Russell. All rights reserved.