Start Menu shortcuts creation on Runtime (Windows)

Answered

Comments

1 comment

  • Avatar
    Michiel

    Using <createShortcuts> in the <postInstallationActionList> in this case would be the best option. Note that you can easily change the startMenuGroupName built-in variable.

    <project>
       ... 
        <startMenuGroupName>Company${project.fullName} ${product_version}</startMenuGroupName>
       ...
    </project>
    

    In the <postInstallationActionList> you can add the <createShortcuts> action.

    <postInstallationActionList>
       <createShortcuts>
           <destination>${windows_folder_common_programs}/${project.startMenuGroupName}</destination>
            <shortcutList>
               <shortcut>
                 <name>Run administrative panel</name>
                 <runAsAdmin>1</runAsAdmin>
                 <windowsExec>${installdir}/admin.exe</windowsExec>
                 <windowsExecArgs></windowsExecArgs>
                 <windowsPath>${installdir}</windowsPath>  
                </shortcut>
            </shortcutList>
         </createShortcuts>
      </postInstallationActionList>
    

    The start menu folder and it't content are automatically deleted during the uninstall.

Please sign in to leave a comment.