Cynthia
Cynthia

Reputation: 33

WIX: Prevent removing pre-existing files during uninstall

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

Upvotes: 3

Views: 1672

Answers (1)

BryanJ
BryanJ

Reputation: 8563

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.

Upvotes: 1

Related Questions