The information in this article applies to:
SUMMARY
WINSET2 is a file in the Microsoft Software Library that contains the
source code necessary to create a Windows-based application installation
program. This program does the following:
MORE INFORMATIONThe following file is available for download from the Microsoft
Download Center. Click the file name below to download the file: Winset2.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. The WINSET2 file contains an internal directory structure. The PKware file extraction utility has a -D option switch that creates the corresponding directory structure on the destination disk. The following files are part of WINSET2: BINCODE Directory BINCODE : Debug build NMAKE file (Microsoft C version 6.0)NOTE: Due to U.S. Government rules regarding the exporting of encryption technologies, EXPAND.C cannot be distributed. COMPEPND Directory COMPRESS.EXE: MS-DOS-based file compressorNOTE: It is a good idea to provide the EXPAND utility with the installed application. This allows users to access the files on the distribution disks. SETUP Directory SETUP : NMAKE file (Microsoft C version 6.0)The following tools are required to build and use WINSET2:
The Contents of a Release Setup DiskThe Setup program has two components, SETUP.EXE and BINXZ.EXE. Setup spawns BINXZ, which actually performs the installation. If Setup determines that it is running from a floppy disk, it will copy BINXZ to the Windows directory on the user's hard disk. BINXZ will run itself from the hard disk and delete itself when done. (BINXZ deletes itself only if it is copied by Setup. If the file is already on the hard disk, it will remain.)Because Setup copies BINXZ to the hard disk, the program can use traditional Windows programming methods (using movable, discardable segments) and still allow the user to change disks in Drive A without disrupting the process. The first disk must contain files as follows: A:\SETUP.EXEIf Setup will be run from a hard disk or from a network, preserve the contents of the BIN directory. Setup will run from a network or a hard disk. All files involved with the installation must be in subdirectories of the "root" installation directory. This is done to prevent the user from running the application(s) directly from the Setup disk. The Contents of an Example Sample DiskA:\SETUP.EXEThe SOL.* files comprise one application. The user has the option to install these files. The REVERSI.* files comprise a second application. The user has the option to install these files. The README.TXT file is required; the user does not have the option to omit installing this file. Setup shields the user from manually selecting SOL.EXE, SOL.DLL, and SOL.HLP. Instead, the user chooses "Solitaire Game" and the system does the necessary mapping to install the following three files: \BIN\SOL.EXEThe "nn" field in the [apps] section of SETUP.INF provides the mechanism to do this. Arbitrarily choose one of the three files, for example SOL.EXE, to be the "main" file. The other two files are marked to depend on the main file. When the user chooses to install the main file, Setup copies all three files to the hard disk. In this example, the "nn" field for SOL.EXE would be 02, to indicate that the next two files depend on SOL. These files must be listed sequentially in the SETUP.INF file. When the Solitaire application is installed, Setup can create an icon for it in the Program Manager. Each icon must reside in a group. Because an application cannot request the list of active groups from the Program Manager using dynamic-data exchange (DDE), the Setup program always creates a new group. The following lines in SETUP.INF define a group called "A":
The "Ic" field in the [apps] section specifies the group where the
icon will be placed. "IA" places the SOL.EXE icon into group "A."
Because the user has the option to install SOL.EXE, the "D" flag in the [apps] section is also specified. In the "complex" version of Setup, this flag adds the application to the Select list box and allows the user to choose to install the application. Each file must be associated with three of strings: the icon title, the application's description (often the same as the icon title), and a comment string (approximately 70 characters long). These fields are appended to the description of SOL.EXE in the [apps] section. Finally, the sizes of SOL.EXE, SOL.DLL, and SOL.HLP sum to 70 kilobytes. This is indicated by the "70" size field at the end of the description. The Solitaire entry in [apps] section of SETUP.INF will resemble the following:
For an uncompressed file, the line in the [apps] section is as
follows:
A compressed file is very similar, adding a "C" to the flags field, as
follows:
The information for REVERSI.EXE is similar to that used above.
However, because REVERSI does not receive a Program Manager icon, the
"IA" flag is not specified.
Because the README.TXT file is required, its line resembles the following:
The Remainder of the SETUP.INF FileThere are three other sections in the INF file: [setup], [disks], and [directories]. The following sections provide some tips regarding these sections.The [setup] section provides additional information about the Setup program.
The [disks] section provides information about the Setup source disks.
The [directories] section provides information about the destination
directories.
Comments about the Source CodeThe Setup program is designed to provide the maximum flexibility with minimum modifications to the source code. However, many applications require special functionality and some features that this code does not provide. Some useful features that this code does not provide include the following:
Additional query words: softlib WINSET2.EXE setup kbfile installation share invalid media
Keywords : kbfile kbNTOS350 kbNTOS351 kbWinOS95 |
Last Reviewed: December 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |