0
1

Hi, how can I create start menu shortcuts at runtime? So far I created Action: "Create shortcuts". This works fine, but I have problem with folder structure creation and deletion. I need to create it in ${windows_folder_common_programs}Company${project.fullName} ${product_version}\

I there some easy way how to create Start menu folders at runtime? Is there some option in action "Create shortcuts" to create these Start menu folders? I did it with another action: Create directory. I there some better way?

Also do I have to delete this folders manually in Post-uninstall Action?

asked 19 Jan, 08:18

Filip%20Matiovsk%C3%BD's gravatar image

Filip Matiovský
612
accept rate: 0%


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.

link

answered 26 Jan, 06:54

Michiel's gravatar image

Michiel ♦
33614
accept rate: 16%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×175
×17
×10
×7

Asked: 19 Jan, 08:18

Seen: 102 times

Last updated: 26 Jan, 06:54