Microsoft KB Archive/100003

= UPD: New Setup Toolkit and Setup Wizard Available for VB 3.0 =

Article ID: 100003

Article Last Modified on 8/5/2004

-

APPLIES TO


 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition

-



This article was previously published under Q100003



SUMMARY
Several bugs were fixed in the Visual Basic Setup Toolkit and Setup Wizard after Visual Basic version 3.0 was released. The latest release of each of these updated files (version 1.00.002 of SETUP.EXE, version 1.00.002 of the Setup1 project files, and version 1.00.551 of the Setup Wizard) can be found in the self-extracting file SETUPK.EXE. In addition, as of June 1994, SETUPK.EXE also includes WW1000.EXE, a self-extracting file that is also available separately in the Microsoft Download Center.

WW1000.EXE is a self extracting file that contains two files (README.TXT and VSHARE.386). VSHARE.386 currently ships as a component of Microsoft Windows for Workgroups versions 3.1 and 3.11, so you may already have it. The VSHARE.386 file is a driver that eliminates the need for SHARE.EXE when you run Windows version 3.1 in 386 enhanced mode. README.TXT is an Application Note that describes the installation and use of the VSHARE.386 driver. By installing and using VSHARE.386, you will prevent all known sharing violation errors when using the Setup Wizard to create installation disks. For more information, please see the "Problems and Limitations" section in this article.

NOTE: VSHARE.386 is exclusively a Windows utility. If you need a file sharing utility for MS-DOS, you still need to use SHARE.EXE.

How to Get SETUPK.EXE
The following file is available for download from the Microsoft Download Center:

Setupk.exe

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.



MORE INFORMATION
The following sections outline the bugs that were fixed and give specific instructions on how to install the updated files.

Installation
After downloading SETUPK.EXE, run it in an empty directory to obtain the files it contains. Then copy the following files to the following locations on top of the existing files by the same name. (This assumes that you have installed Visual Basic in to the default directory C:\VB and Microsoft Windows in the C:\WINDOWS directory.) SETUP.EXE        ->  C:\VB\SETUPKIT\KITFILES\SETUP.EXE SETUP1.FRM       ->  C:\VB\SETUPKIT\SETUP1\SETUP1.FRM SETUP1.FRX       ->  C:\VB\SETUPKIT\SETUP1\SETUP1.FRX SETUP1.BAS       ->  C:\VB\SETUPKIT\SETUP1\SETUP1.BAS SETUPWIZ.EXE     ->  C:\VB\SETUPKIT\KITFILES\SETUPWIZ.EXE SETUPWIZ.INI     ->  C:\WINDOWS\SETUPWIZ.INI and C:\VB\SETUPKIT\KITFILES\SETUPWIZ.INI NOTE: Please update lines 2 through 5 of the SETUPWIZ.INI file to reflect the directory where you installed Visual Basic if it is different from the C:\VB directory.

The SETUPWIZ.INI file included here does not reflect the changes necessary to use the Access 2.0 Compatibility Layer files. NOTE: Do not load SETUPK/SETUPWIZ.INI if the compatibility layer has already been installed!

For more details on the Compatibility Layer, please see the following article(s) in the Microsoft Knowledge Base:

113594 Updated ACC2COMP.TXT for Jet 2.0/VB 3.0 Compatibility Layer

Distribution
You can distribute these files royalty free with any Visual Basic application that you create.

Setup Wizard Notes
To check the internal version number of your SETUPWIZ.EXE, open a copy of the file in an editor, and search for the string "ver:" This will show the version number. Visual Basic version 3.0 for Windows shipped with SETUPWIZ.EXE version 1.00.532.

SETUP.EXE Notes
To check the internal version number of your SETUP.EXE, open a copy of the file in an editor, and search for the string "FileVersion" to show the version number. Note, This version information was added only after version 1.00.002. Version   Bug Fix/Feature              Comments --- 1.00.002  VER.DLL is truncated to      SETUP.EXE now checks to see zero bytes if it is not     if VER.DL_ exists on  your found or has an incorrect   distribution disk. If it is          name on the distribution     not found, the following error disk. error is displayed and then SETUP.EXE terminates: "Error - File not found:                                       A:\VER.DL_. This file is                                        required by Setup."

1.00.002  SETUP.EXE does not run       When running SETUP.EXE in           in Windows version 3.0. Microsoft Windows version 3.0, you will receive the error "This                                       application requires a newer                                        version of Windows." This error causes SETUP.EXE to terminate. This bug has been fixed so that SETUP.EXE will run successfully in Microsoft Windows version 3.0.

1.00.002  The Visual Basic version     This problem occurs because 3.0 THREED.VBX does not     the file type of THREED.VBX overwrite the Visual Basic  changed from "APP" to "DLL" version 2.0 THREED.VBX. between version 2.0 and 3.0. SETUP.EXE now ignores file type differences and will install any file where the source and destination names are the same when the source file is the same or a newer version.

1.00.002  This error message:          The error messages are now "Could not open or read     "Error - Could not open file: file: " was       " and "Error - Could           replaced with two            not read file: ." separate error messages. Both errors cause SETUP.EXE to                                       terminate.

1.00.002  New error message added:     The new error message replaces: "Error - Insufficient       "Error - Could not copy file: disk space on drive         -> :" This       " error causes SETUP.EXE      when there is insufficient to terminate. disk space.

1.00.002  Version information was      The version number 1.00.002 added to SETUP.EXE. was added to SETUP.EXE. Previous versions of SETUP.EXE have no version number.

1.00.003  Running SETUP.EXE            This problem has been fixed so           version 1.00.002 from a      that you can run SETUP.EXE from subdirectory causes         a subdirectory. SETUP.EXE "Error - Could not open     provided with Visual Basic           file: SETUP.LST  version 3.0 does not have this                                        problem.

1.00.003 VER.DL_ on distribution       SETUP.EXE now copies VER.DL_ disk does not copy over      when the file/date time stamp of          VER.DLL in destination        the destination VER.DLL file is          directory if the file date/   the same. time stamp is the same for both files.

1.00.004 A  "Cannot copy file ..." SETUP.EXE no longer gives an         error message occurs when     error when the source file has attempting to copy a file    an older version number than referenced in SETUP.LST that the destination file. has an older version number than the same file on the destination drive. This error causes SETUP.EXE to         terminate.

1.00.004 SETUP.EXE copies over the     SETUP.EXE no longer attempts to          same or older version of      copy VER.DLL if it is already in          VER.DLL if it is in use       use. It assumes that it can use by another application such  an older version of VER.DLL if          as File Manager. This can   it exists and is in use. lead to a General Protection Fault (GP fault).

SETUP1 Project Files Notes
To check the internal version number of the Setup1 project files, check the general declarations section of SETUP1.FRM. (This version information was added only after version 1.00.002 of the Setup kit.) Version Bug                               Comments - 1.00.001 SETUP1.EXE fails to copy the     This problem occurs because Visual Basic version 3.0         the file type of THREED.VBX c         THREED.VBX over the Visual        changed from APP to DLL Basic version 2.0 THREED.VBX. between Visual Basic versions 2.0 and 3.0. The CopyFile function in                                          SETUP1.BAS was modified so                                           that any file will be copied regardless of its type as                                          long as the source file is                                           the same or newer version when compared to the destination file.

1.00.001 SETUP1.EXE fails when attempting A problem in         to show a Program Manager group   CreateProgManItem when under Norton Desktop             executing the ShowGroup DDE command causes SETUP1.EXE to                                          fail under Norton Desktop. The syntax on the call to the ShowGroup DDE command was fixed to overcome this problem.

1.00.001 Unnecessary code included in     SETUP1.FRM contains code that Form_Load event procedure of     has been disabled by making SETUP1.FRM. it into a comment. This code was useful in the Visual Basic version 1.0 of the Setup Toolkit. However, the features demonstrated by this code were removed from the Visual Basic version 2.0 and 3.0 Setup Toolkit. This code was removed.

1.00.001 Incorrect references to          Messages containing "Test Application"               references to "Test                                           Application" were changed to                                           reference the actual name of                                           the application.

1.00.002 Setup Wizard is not able to      Changes to the Setup Wizard break large files (greater       version 1.00.548 to fix this         than 1.2 meg in size)             problem required changes to         across multiple disks             the CopyFile and ConcatSplitFiles routines in                                          SETUP1.BAS.

1.00.002 A version number was added       Check the general to a comment in the general      declarations section of         declarations section of           SETUP1.FRM to determine the SETUP1.FRM. current version number of                                          SETUP1.

Changes Made to the CopyFile and ConcateSplitFiles Routines in SETUP1.BAS
Old SETUP1 Code: In Function CopyFile:

If InFileVer$ <= OutFileVer$ Then

In Sub ConcatSplitFiles:

CopyLeftOver& = outfileLen& Mod 10 CopyChunk# = (outfileLen& - CopyLeftOver&) / 10 filevar$ = String$(CopyLeftOver&, 32) Get #fh2%,, filevar$ Put #fh1%,, filevar$ filevar$ = String$(CopyChunk#, 32) iFileMax% = 10 New SETUP1 Code: In Function CopyFile:

If InFileVer$ <= OutFileVer$ And SourcePath <> DestinationPath Then

In Sub ConcatSplitFiles:

CopyLeftOver& = outfileLen& Mod 100 CopyChunk# = (outfileLen& - CopyLeftOver&) / 100 filevar$ = String$(CopyLeftOver&, 32) Get #fh2%,, filevar$ Put #fh1%,, filevar$ filevar$ = String$(CopyChunk#, 32) iFileMax% = 100

Problems and Limitations
 COMPRESS.EXE will take only a limited length command line. If SetupWizard is in a subdirectory that is nested too deep, COMPRESS will not work correctly. In this case, you will encounter a 'File does not exist' error when the file does exist. To work around this problem, move the SETUPKIT subdirectory up one or more directory levels until COMPRESS works. The Setup Wizard requires that your .EXE file completely reside on the first distribution disk. It will not split this file. If .EX_ is too large to fit on the first disk, an error will occur. To work around this problem, perform these steps:  Start Visual Basic and create a temporary project file, .MAK. Give the project one codeless form and no custom controls. Save the project, create the .EXE file, and exit Visual Basic. Run the Setup Wizard specifying .MAK, and add your real project's .EXE file and all of the required supporting files during step 5 to create installation disks. Start Visual Basic and open the SETUP1A.MAK project file in the \VB\SETUPKIT\KITFILES directory and modify the Form_Load procedure in SETUP1A.FRM as follows: <ul>  Delete the following line: If Not CopyFile(SourcePath$, destPath$, " .EX_",              " .EXE") Then GoTo ErrorSetup </li>  Change the file name .EX_ in the following statement: If Not PromptForNextDisk(1, SourcePath$ + " .EX_") Then GoTo ErrorSetup to the name of another file found of the first distribution disk, such as SETUP1.EX_: If Not PromptForNextDisk(1, SourcePath$ + "SETUP1.EX_") Then GoTo ErrorSetup </li> Create a new SETUP1.EXE.</li></ul> </li> Shell out to MS-DOS to the \VB\SETUPKIT\SETUP1 directory and compress SETUP1.EXE using this command:

\VB\SETUPKIT\KITFILES\COMPRESS SETUP1.EXE -R

</li> Copy your new SETUP1.EX_ onto your first distribution disk.</li></ol> </li> The Setup Wizard will not write to an installation disk that has damaged sectors, even if there is room for the project on it. This behavior is by design.</li> The Setup Wizard will not split a file into more than nine pieces. If you need to ship a file that large, use another method to store the file.</li> When doing step 1 of the Setup Wizard, if you select a valid .MAK file by using the common dialog and then reset it to C:\, you will cause an untrapped fatal error. This problem occurs only when you use the 'Select MAK file' option and then modify the result. This problem does not occur if the 'Select MAK file' option is not used.</li> When doing step 5 of the Setup Wizard, if you add a large number of files, such as the entire WINDOWS directory, by using the common dialog box, the Setup Wizard:

<ul> Adds none of the file names.</li> Places a pause symbol (sideways =) in the list.</li> Does not generate an error message.</li></ul>

This is caused by exceeding a buffer size limitation. You can delete the pause symbol without consequence.</li> The Setup Wizard does not handle files that have nearly identical names correctly. If the names are identical except for the last letter (such as FORM1.FRM and FORM1.FRX), when the Setup Wizard compresses the second file, it does not check to determine if a file of that name (FORM1.FR_) already exists.

To work around this problem, rename files that will cause this error before they are compressed. For example rename FORM1.FRX to FORM1X.FRX. To create the distribution disks, following these steps: <ol> Start Visual Basic, and open the SETUP1A.MAK project file in the \VB\SETUPKIT\KITFILES directory. Modify the Form_Load procedure in SETUP1A.FRM as follows: <ul>  Change the file name FORM1X.FRX in the following statement: If Not CopyFile(SourcePath$, destPath$, "FORM1X.FR_",              "FORM1X.FRX") Then GoTo ErrorSetup to the correct file name, FORM1.FRX: If Not CopyFile(SourcePath$, destPath$, "FORM1X.FR_",              "FORM1.FRX") Then GoTo ErrorSetup </li> Create a new SETUP1.EXE.</li></ul> </li> <li>Shell out to MS-DOS in the \VB\SETUPKIT\SETUP1 directory, and compress SETUP1.EXE by using this command:

\VB\SETUPKIT\KITFILES\COMPRESS SETUP1.EXE -R

</li> <li>Copy your new SETUP1.EX_ onto your first distribution disk.</li></ol> </li> <li>Program manager Groups and Items may not install correctly on systems using an alternate desktop, such as Norton Desktop for Windows 2.2. For more information on this problem, please see the following article in the Microsoft Knowledge Base:

108498 PRB: DDE Error When Running Setup on Norton Desktop

</li> <li>The error message 'Sharing Violation on drive C:' may be displayed during the compression stage (Step 6) when using the Setup Wizard. This is caused by the combination of the file sharing utility SHARE.EXE, the compression utility COMPRESS.EXE, and the Setup Wizard tool SETUPWIZ.EXE. The problem occurs when the compression utility tries to open the files SETUPKIT.DLL, VBRUN300.DLL, COMMDLG.DLL, and/or CMDIALOG.VBX.

To work around this problem, copy SETUPKIT.DLL, VBRUN300.DLL, COMMDLG.DLL, and CMDIALOG.VBX from the \WINDOWS\SYSTEM directory to the directory where the SETUPWIZ.EXE file is located. Then SETUPWIZ.EXE and COMPRESS.EXE will not try to use the same files at the same time. Set the read-only attribute of all four files. This can be done via File Manager in Windows or by using the Attrib command from the DOS prompt.

Users of Windows for Workgroups do not encounter this problem due to the fact that it uses VSHARE.386, an alternative file sharing utility to SHARE.EXE. Users of Windows 3.1 can also use this utility by installing VSHARE.386. Run the file WW1000.EXE, a self-extracting file included in SETUPK.EXE, to obtain the instructions (README.TXT) and the driver (VSHARE.386).

For more information on this Bug, please see the following article in the Microsoft Knowledge Base:

102478 BUG: Setup Wizard Error: Sharing Violation Reading Drive C:

</li> <li>Filenames specified in SETUPWIZ.INI must be specified with all uppercase letters. This works around a problem with the Setup Wizard where files specified with the ":1" option are improperly installed into the same directory as the project .EXE file.</li> <li>The Setup Wizard can stop short between screens 5 & 6 for the following reasons: <ol> <li>Bad versions of SETUPKIT.DLL or VER.DLL are in your path. Search your path for multiple copies of these DLLs and delete the extras.</li> <li>Bad path information in \WINDOWS\SETUPWIZ.INI, \WINDOWS\VB.INI, or SETUP1.MAK. Open these files in a text editor and make certain they refer to where you put your VB directories. If you updated using SETUPK.EXE and just copied SETUPWIZ.INI over to top of \WINDOWS\SETUPWIZ.INI, the directory information at the top of the file may no longer be accurate</li></ol> </li> <li>Install disks created on the M8 Beta release of Win95 do not work properly on earlier versions of Windows and may cause significant problems with Windows versions 3.x systems. This problem has been handled in later versions of Windows 95. Note that creating production files on Beta operating systems is discouraged.</li> <li>Placing additional files in SETUP.LST will cause multiple installs of the same disk set to fail on Windows 95 only. One of the error messages that may occur is as follows: "error could not execute .exe 2". Removing all files from SETUP.LST other than those placed there by the Setup Wizard eliminates this problem.</li></ul>

Additional query words: setupk

Keywords: kbfile kbsetup kbwizard KB100003

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.