How can I prevent a file to be uninstalled?

asked 14 Sep '11, 05:17

Jake's gravatar image

Jake ♦♦
accept rate: 98%

You can use the <removeFilesFromUninstaller> action:


Files may be specified each on a single line or separated by semi-colons.

This action doesn't work recursively on directories. You may use though wildcards to achieve a similar effect:


(the number of asterisks may vary depending on the depth of nested children inside the folder)

IMPORTANT: this action requires the files to have already been installed by the installer and also requires the files to exist on disk. This usually implies setting the <removeFilesFromUninstaller> action inside the <postInstallationActionList>.

Also note that the uninstaller is only responsible for removing files directly installed by the installer. Any other file generated as a result of an application execution (for instance any data, log or temporary files) will not be registered by the uninstaller so they will not be removed. You may want to use the counterpart of this action (<addFilesToUninstaller>) to register files so they will be deleted by the uninstaller.


answered 14 Sep '11, 05:20

Jake's gravatar image

Jake ♦♦
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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



Asked: 14 Sep '11, 05:17

Seen: 1,244 times

Last updated: 14 Sep '11, 05:20