Microsoft KB Archive/193082

= How To Build a Setup Program Creating Multiple Groups and Icons =

Article ID: 193082

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition

-



This article was previously published under Q193082



SUMMARY
By default, the Microsoft Visual Basic 5.0 Setup Wizard creates one program group using the project name, and one icon within the program group for the executable file generated by the project. This article shows how to create additional program groups and more than one icon within a group for any additional executable files you want to ship by customizing the Visual Basic Setup Toolkit's Setup1.vbp project.

NOTE: Microsoft Technical Support does not support the modification of the setup process or any of the setup files. Support is provided for the Setup Wizard on an "as is" basis only.



MORE INFORMATION
To allow for multiple group and icon creation, the Setup Toolkit uses CreateShellGroup and CreateOSLink procedures. These procedures can be used to create custom groups and icons.

NOTE: Before making any modifications to the Setup1.vbp, backup the contents of the Setup1 directory. This directory can be located in the following path:

c:\program files\devstudio\vb\setupkit\setup1\setup1.vbp

(Modify path information accordingly.)

Step-By-Step
 Start Microsoft Visual Basic and open the Setup1.vbp project located in the following directory by default:

c:\program files\devstudio\vb\setupkit\setup1\setup1.vbp

(Modify path information accordingly.)

 In the Project Explorer window, click to expand the Forms collection. Right-click on the form "frmSetup1" and click View Code.  In the Form_Load event, locate the following line of code:

CreateOSLink frmSetup1, strGroupName, gsDest.strAppDir & "My Exe 1.exe", "My Exe 1 command-line arguments", "My Exe 1"

NOTE: The line above represents one line of code.   The lines of code below demonstrate how an additional group and icon can be created:

'Allows for creation of additional icons fAdditionalIcons = True 'Creates a group entitles "My Group" on the Programs menu fCreateShellGroup "My Group", False, True 'Creates a shortcut in the "My Group" folder, where the target 'application is test.exe and is entitled "My test exe file" CreateOSLink frmSetup1, "My Group", gsDest.strAppDir & "test.exe", _ "", "My test exe file"

 On the File menu, click Make Setup1.exe. If desired, save the Setup Toolkit project and exit Visual Basic. Use the Setup Wizard as normal to create the application distribution set.</li></ol>

<div class="references_section">