My installer's final installation page gives the user the option to create desktop shortcuts for the application. I understand that because these are created after the uninstaller have been created they are not deleted during the uninstallation process. For this reason, I have specified for the shortcut files to be deleted in a <preuninstallationactionlist> as follows:

<preUninstallationActionList>
<deleteFile>
    <path>${windows_folder_desktopdirectory}/${product_fullname} ${product_version}</path>
    <ruleList>
        <fileExists>
            <path>${windows_folder_desktopdirectory}/${product_fullname} ${product_version}</path>
        </fileExists>
        <platformTest>
            <type>windows</type>
        </platformTest>
    </ruleList>
</deleteFile>
</preUninstallationActionList>

However, the shortcut files are not deleted during the uninstallation process. Can anyone please let me know if I am doing anything wrong? Thanks.

asked 01 Jul '12, 16:14

jalexrod's gravatar image

jalexrod
38121215
accept rate: 0%


If you are defining the name of the shortcut as ${product_fullname} ${product_version}, the filename will be ${product_fullname} ${product_version}.lnk so the code should be:

<preUninstallationActionList>
    <deleteFile>
      <path>${windows_folder_desktopdirectory}/${product_fullname} ${product_version}.lnk</path>
      <ruleList>
         <platformTest>
             <type>windows</type>
         </platformTest>
      </ruleList>
    </deleteFile>
 </preUninstallationActionList>
link

answered 01 Jul '12, 16:55

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

yes that works! Thanks for point out the error of my ways!

(01 Jul '12, 17:47) jalexrod
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:

×54
×29
×14

Asked: 01 Jul '12, 16:14

Seen: 1,664 times

Last updated: 01 Jul '12, 17:47