Microsoft KB Archive/110395

From BetaArchive Wiki

Article ID: 110395

Article Last Modified on 2/24/2005



APPLIES TO

  • Microsoft Visual Basic 3.0 Professional Edition
  • Microsoft Visual Basic 3.0 Professional Edition



This article was previously published under Q110395

SUMMARY

Using the Visual Basic Setup Toolkit, you can modify the setup program that was created by Setupwizard.

The example shown below makes your setup program install your program file to the Windows directory instead of to the directory specified by the user. You can do this by changing the SETUP1A.FRM source code. You can then make a new SETUP1.EXE file and new SETUP1.EX_ file on your distribution disk.

MORE INFORMATION

Step-by-Step Example

  1. Run the Setupwizard to create the master distribution disks for your product's files.
  2. Start Visual Basic and open the SETUP1A.MAK project. SETUP1A.MAK is already on the most recently opened list on the File menu because the Setupwizard used it once. The Setupwizard created the SETUP1A.MAK project in the C:\VB\SETUPKIT\SETUP1 directory.
  3. Go to the Form Load event for the SETUP1A.FRM form. Find the lines of code that copy your file, which will appear as follows - but on one, single line:

          If Not CopyFile(SourcePath$, destPath$, "yours.EX_", "yours.EXE")
             Then GoTo ErrorSetup
    
                            

    If you want to install your file <yours>.EXE into the user's Windows directory, change the destPath$ variable to WinDir$ as follows:

          ' Enter the following on one, single line:
          If Not CopyFile(SourcePath$, WinDir$, "yours.EX_", "yours.EXE")
             Then GoTo ErrorSetup
    
                            

    You might want to change the destination to another directory, depending on your setup design.

  4. From the File menu, choose Make EXE File to re-create the file SETUP1.EXE in the C:\VB\SETUPKIT\SETUP1 directory.
  5. Compress and copy this new SETUP1.EXE file to your distribution disk. For example, the following command at the MS-DOS prompt compresses SETUP1.EXE into SETUP1.EX_ and copies SETUP1.EX_ to Drive A:

    C:\VB\SETUPKIT\KITFILES\COMPRESS -r SETUP1.EXE A:\

    This replaces the old SETUP1.EX_ that was created on the distribution disk by the Setupwizard.

Updated Setup Toolkit Files

The following Setup Toolkit files were updated after Visual Basic version 3.0 shipped. The list shows the directories where the files are usually located relative to the Visual Basic directory.

   File                             Purpose
   ---------------------------------------------------------------
   \WINDOWS\SETUPWIZ.INI            Setupwizard configuration file
   SETUPKIT\KITFILES\SETUP.EXE      Setup toolkit
   SETUPKIT\KITFILES\SETUPWIZ.EXE   Application Setupwizard
   SETUPKIT\SETUP1\SETUP1.BAS       Setup toolkit
   SETUPKIT\SETUP1\SETUP1.FRM       Setup toolkit
                


The following files are available for download from the Microsoft Download Center:

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services


Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Visual Basic Setup Toolkit and SetupWizard

The following section is taken from the SetupWizard topic in the Visual Basic Help menu:

SETUP.EXE is the bootstrap program provided by the Visual Basic Setup Toolkit in the KITFILES subdirectory. SETUP.EXE pre-installs files listed in SETUP.LST and then runs SETUP1.EXE.

SETUP1.EXE is the Visual Basic setup program created by the SetupWizard. The source files for the Visual Basic Setup Toolkit's SETUP1.EXE file are in the SETUPKIT\SETUP1 subdirectory.

SETUP.LST is a file required by SETUP.EXE. It allows files needed by your Visual Basic setup program to be pre-installed into the Windows System directory. SETUP.LST lists the files to be pre-installed by the SETUP.EXE bootstrap. Each line contains a single file. The Visual Basic setup program (SETUP1.EXE) must be the first entry. SETUP.LST is created automatically by the SetupWizard. The files in SETUP.LST can be compressed. Here is a sample SETUP.LST file:

SETUP1.EX_
VBRUN300.DL_
SETUPKIT.DL_
GRID.VB_



The Visual Basic SetupWizard is a tool used with the Visual Basic Setup Toolkit. The SetupWizard takes you through six steps to create master distribution disks for your Visual Basic application.

The first time you run the SetupWizard, you are prompted for the location of several important files. This information is then kept in the SETUPWIZ.INI file in your Windows directory. The SetupWizard creates a standard SETUP1.EXE file based on the information in your .MAK file and the information you provide in the SetupWizard. The SetupWizard supports multiple disks and can split large files to fit on your disk media.

NOTE: The SetupWizard is geared toward Visual Basic developers and is not a general Windows Setup Tool. Use the GUI Setup Toolkit provided in the Windows SDK. The SetupWizard is designed to handle most setup scenarios that a Visual Basic developer may encounter. Some scenarios may require you to create a custom SETUP1.EXE file.

The SetupWizard is not a diskcopy tool. Use MS-DOS's DiskCopy or File Manager's Disk Copy Disk menu choice to make copies of your master distribution disks.

REFERENCES

See the SetupWizard topic in Visual Basic's Help menu.


Additional query words: 3.00 installing

Keywords: kbinfo kbdownload kbfile KB110395