3
votes

The WIX installer I'm writing needs to install several operating system files in system folder. The program I'm writing this installer for is an old program... probably 10 years. I don't want it to replace any preexisting OS files on the user's machine. To resolve this, I figured I could use "NeverOverwrite="yes"

My problem is during the uninstall. I want the installer to ONLY uninstall the files it added. I don't want it to uninstall any pre-exisitng OS files the user already had.

Thank you

1
The installer should only delete the files in the components its has installed. Is the installer deleting the files that were already on the system? - Natalie Carr
It is. It's being quite strange. Another thing it's doing... on one of the components I had added NeverOverwrite="yes" Permanent="yes". That was working as expected, it did not remove the file during uninstall or overwrite during install. However, I removed Permanent="yes", built the installer again and it's still not removing the file during uninstall even though i removed that code. I tried cleaning the soln and rebuilding... still no good. Other changes i make to the code still appear tho - Cynthia
Have you followed a verbose log? I would take BryanJ's advice and make them permanent so that they dont get uninstalled. - Natalie Carr

1 Answers

1
votes

The installer should not delete files that it did not install (as Natalie commented), unless you specifically tell it to.

That said, when I need to install files directly to the system folder, I mark them as permanent so they never get uninstalled. Usually it's a Mircrosoft control or some OS file for which I don't have a separate redistributable installer, but if I had I wouldn't uninstall anyway.