DOCUMENT:Q193082 24-SEP-1998 [vbwin] TITLE :HOWTO: Build a Setup Program Creating Multiple Groups and Icons PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 5.0 --------------------------------------------------------------------- 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 ------------ 1. 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.) 2. In the Project Explorer window, click to expand the Forms collection. 3. Right-click on the form "frmSetup1" and click View Code. 4. 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. 5. 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" 6. On the File menu, click Make Setup1.exe. If desired, save the Setup Toolkit project and exit Visual Basic. 7. Use the Setup Wizard as normal to create the application distribution set. REFERENCES ========== For additional information, please see the following articles in the Microsoft Knowledge Base: ARTICLE-ID: Q182116 TITLE : INFO: Troubleshooting Visual Basic Setup Wizard Issues ARTICLE-ID: Q189738 TITLE : HOWTO: Run Setup1.vbp in the Design Environment Additional query words: kbdss kbDSupport kbVBp kbVBp500 kbAppSetup kbWizard kbToolKit ====================================================================== Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbhowto ============================================================================= 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. Copyright Microsoft Corporation 1998.