Hello,
In order to achieve what you want you can take a look on our
"How do I prevent a file with registry entry from being uninstalled or repaired" article. Also, please keep in mind that in order to achieve this you need at least a Professional project type.
If you have any questions, let us know.
All the best,
Daniel