Install a file which should be removed only on real uninstall and never overwritten
- by Viv Coco
When I install my application, along with the binaries, a conf file is installed that the user can change as he needs (it's actually the user data file). I would like this file to not be overwritten or deleted when a repair, upgrade, modify happens and it should be deleted only when a real uninstall happens. In other words: this conf file is installed along with the binaries and should never be touched again (overwritten/deleted) until a real uninstall happens (not repairs, modifies, upgrades) in which case it should be deleted.
So I was thinking of doing:
<Component Id="aaa.cfg" Guid="GUID">
<File Id="aaa.cfg" Source="aaa.cfg" KeyPath="yes" />
</Component>
But I don't know how could I condition the component so that:
1) the component to be removed only on a real uninstall - not upgrades, repairs, modifies?
2) the file should in no case be overwritten if already exists.
Thx,
Viv