Steve White
Microsoft Corporation
Revision Date: January 1999
For the latest information, see www.microsoft.com/officedev/default.htm.
The Microsoft® Office 2000 Developer Package and Deployment Wizard uses two setup programs to install your application files onto the user's computer — Setup.exe and Setup1.exe. The Setup.exe program performs pre-installation processing on the user's computer, including installing the Setup1.exe program and any other files needed for the main installation program to run. Setup1.exe contains the forms and code used during installation and can be customized using the Setup Toolkit.
You can use the Setup Toolkit to modify the Setup1 project, in order to customize the functionality or appearance of the Package and Deployment Wizard or to create a custom setup program that does not use the Package and Deployment wizard. Depending on the changes you make to Setup1, you may need to add code to manually perform the steps the Package and Deployment Wizard would otherwise do for you.
Note To modify the Setup1 project, you need Microsoft Visual Basic® 6.0 installed on your development machine. The Setup1 source code is written in, and must be compiled with, Visual Basic 6.0.
You can modify the Setup1.vbp project if you want to add new screens, prompts, or events to the installation sequence created by the Package and Deployment Wizard. You write code in the setup program just as you would in any other Visual Basic program. A number of function calls are available that are especially useful in setup routines.
Some examples of situations in which you might modify the Setup Toolkit project include:
Note The Microsoft Office 2000 Developer Package and Deployment Wizard does not use the files in the Setup Toolkit project, but you should always make a backup of the project before making any changes.
If you are creating your own custom setup package, continue through the steps outlined in "Creating a Custom Setup Program" below.
If you want only to customize the installation sequence that the user must follow, you can simplify your work by using the Package and Deployment Wizard's existing functionality together with a customized Setup Toolkit project (Setup1.vbp).
Note Of the two setup programs, Setup.exe and Setup1.exe, only Setup1.exe can be customized.
You can use the Setup Toolkit and the Package and Deployment Wizard together to add dialog boxes to the installation program, prompting the user to specify whether to install optional features in your application. For example, you may have an online Help file that some users would rather not install. You can add as many installation options as you want.
Dim LoadHelp As Integer
LoadHelp = MsgBox ("Do you want to install Help?", vbYesNo)
If LoadHelp = vbYes Then
CalcDiskSpace "Help"
EndIf
.
.
' Block of code containing cIcons = CountIcons(strINI FILES)
If LoadHelp = vbYes Then
cIcons = CountIcons("Help")
EndIf
' Block of code containing CopySection strINI_FILES.
.
If LoadHelp = vbYes Then
CopySection "Help"
EndIf
.
' Block of code containing CreateIcons _
strINI FILES, strGroupName
[Help]
File1=5,SPLIT,MyApp.HL1,MyApp.HLP,$(AppPath),,,10/12/96,2946967
File2=6,SPLIT,MyApp.HL2,MyApp.HLP
File3=7,,MyApp.HL3,MyApp.HLP
In this example, when the user runs the installation program, the Setup program copies all the [BootStrap] files to the user's machine, and then prompts the user to indicate whether to install the Help files. If the user chooses Yes, the CalcDiskSpace statement determines whether there is sufficient disk space on the user's machine for the Help files. The program then installs all of the files listed with the [Files] section in Setup.lst.
Next, the program tests the LoadHelp flag again. If the user chose to install the Help files, Setup1.exe then executes the CopySection statement for the Help files, and installs the files listed in the [Help] section of Setup.lst.
You can use the Setup Toolkit to create a new setup program that does not use the Package and Deployment Wizard. In this case, you will need to add the necessary functionality normally handled by the Package and Deployment Wizard directly to your setup program.
Tip You can use the Package and Deployment Wizard to create your .cab files, then modify the .cab files manually. When the wizard creates your .cab files, it creates a .ddf file and a batch file in the \Support subdirectory of your project directory. To modify the .cab files, edit the .ddf file, then run the batch file provided. The batch file in turn will run Makecab.exe to recreate your .cab files.