Is there a way to suspend inclusion of commands in the uninstaller?

To illustrate what I mean:

User installs version N of program;
It sets up registry entries - like document extension and icon.

User installs upgrade to version N+1
It sets up (overwrites) registry entries - like document extension and icon.

User uninstalls version N
Registry entries, supposedly installed with version N, but actually wanted for version N+1 are removed.


Now if there were a command in the install script to suspend/resume inclusion of commands in the uninstaller

....
Suspend inclusion in uninstaller
Add registry entries
Resume inclusion in uninstaller
....

or something equivalent, then this would be easily avoidable.

But I can't find one. is there anything?

Dave