4

I use the Wix installer, I create a tree of folders and files, they are created on the install but not removed on the uninstall, and I can't find out why. (I also tried to use the removeRFile component)

I don't need removeFile because I want the installation files to be removed, not files that are created by the application.

BartoszKP
  • 32,105
  • 13
  • 92
  • 123

2 Answers2

3

The RemoveFile element only deletes files and empty folders. If you have a complicated dir structure your best approach would be a custom action. This topic was also debated here: Removing files when uninstalling WiX

Community
  • 1
  • 1
Ciprian
  • 3,415
  • 1
  • 16
  • 22
0

Have you logged the installer and read through it to understand why? Typically this is a result of doing a minor upgrade and breaking the component rules between builds. Other reasons could be the files were modifed by the application after installation or the files already being there prior to the install and jacking up all the reference counts.

Test on a clean VM by applying a snapshot and start with installing, uninstalling the same build without ever running the application. From there go onto running the app and testing upgrade scenarios.

Christopher Painter
  • 52,390
  • 6
  • 60
  • 97