windows-7izpack

How do I get IzPack to add my application to the Start Menu?


I've read the whole manual twice now and have my XML build file setup so that it does everything except insert the program into the Start Menu on Windows (my test machine happens to be Windows 7, but I imagine the problem will also happen on Vista) machines. What option am I overlooking?

shortcutSpec.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<shortcuts>
<skipIfNotSupported/>
    <programGroup defaultName="myapp" location="applications"/>
    <shortcut
        name="myapp"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myapp.jar"
        commandLine=""
        description="myapp"
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="3">
        <createForPack name="Base"/>
    </shortcut>
    <shortcut
        name="myapp Documentation"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myappMan.pdf"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="30"
        description="myapp docs">
        <createForPack name="Manual"/>
    </shortcut>                
    <shortcut
        name="myapp Uninstaller"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="Uninstall myapp">
        <createForPack name="Base"/>
    </shortcut>
</shortcuts>

Solution

  • from IzPack doc : HERE

    <programGroup> is a tag within shortcutSpec.xml

    The <programGroup> tag allows you to specify the name of the menu, or more precise, the folder in which the shortcuts will be grouped. The exact location and appearance of the program group depends on the specific target system on which the application will be installed, however you can partially control it. Please note that <programGroup> may only appear once in the specification. If more than one instance occurs, only the first one will be used.
    This tag requires two attributes: defaultName and location. defaultName specifies the name that the group menu should have on the target system. You should be aware that the ShortcutPanel will present this name to the user as a choice. The user can then edit this name or select a group that already exists. As a result, there is no guarantee that the actual name of the program group on the target system is identical with your specification. location specifies where the group menu should show up. There are two choices: applications and startMenu. If you use applications, then the menu will be placed in the menu that is ordinarily used for application shortcuts. applications is recommended for Unix shortcuts.
    If you use startMenu, the group menu will be placed at the top most menu level available on the target system. Depending on the target system, it might not be possible to honor this specification exactly. In such cases, the ShortcutPanel will map the choice to the location that most closely resembles your choice. Unix shortcuts do not need to support the startMenu, because the applications menu is already on the highest level. This means this has no affect on thess platform.

    Check the accepted answer here for a working example of shortcutSpec.xml