FILE: Modify Destination Directory of Setupwizard SETUP1.EXE

Last reviewed: February 5, 1997
Article ID: Q110395
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, version 3.0

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 file is available for download from the Microsoft Software Library:

 ~ setupk.exe (size: 104224 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services

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.


KBCategory: kbtool kbprg kbfile
KBSubcategory: TlsSetWiz update3.00
Additional reference words: 3.00 installing




THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.