Folder Operations Tab
In this dialog you can set the folder to be removed when a component is installed or uninstalled. Also, you can enable its content to be persistent during an upgrade.
This feature should not be used for System folders as it could lead to System corruption.
Using this feature for folders containing a very large amount of data will increase the installation time accordingly.
Remove
Folders for removal will be marked visually with this icon:.
By default Windows Installer will remove only the resources that were installed by the MSI package. This removal operation is intended to be used for external resources created by custom behaviour.
Operation
- Remove folder only if it is empty – the folder will be removed only if it is empty at the moment the operation will execute.
- Always remove folder(even if it is not empty) – the folder will be removed anyway, no matter if it is empty or not
Component
The component which will trigger the folder removal operation.
Remove On
The time when the removal will be executed. There are three available moments:
- component install
- component uninstall
- both
Condition
Specify a condition for the folder removal.
You can specify files to be removed upon install or uninstall from the File Removal Dialog.
Overwrite behavior
Specify the folder content's overwrite behavior.
Overwrite only if the existing files are older
When this option is selected, if the files from the folder on the target machine are older then the one included in the package, they will be overwritten.
Always overwrite existing files
If this option is enabled, the files from this folder in your package will overwrite any similar files already present on the target computer. Usually this can be used when performing a downgrade (install files older than the ones already installed) or for non-versioned files which don't overwrite the existing files.
Do not overwrite existing files
Condition when the folder content will be preserved. To find out how to use this option in an upgrade scenario, you can follow the Prevent Repair or Uninstall article.
If you don't need to preserve all the folder content, it is recommended to enable this option specifically for each file you want to preserve, especially for folders with large content.
Persistence
Save and restore original folder content.
Condition
Condition when the folder content will be preserved.
To find out how to use this option in an upgrade scenario, you can follow the Prevent Repair or Uninstall article.