Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How Prevent uninstall package from machine if a registry not set but others work like modify or upgrade.

What I have tried:

I try this code:
    <Condition Message="Could not uninstall">
    <![CDATA[(DISABLEREGKEY AND (REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)) OR 
           ((NOT Installed) AND (NOT PATCH)) OR 
           (Installed AND (NOT REMOVE))                                                                 
    </Condition>

But it dont work in upgrade to newer version
Posted
Comments
Sergey Alexandrovich Kryukov 27-Apr-16 3:10am    
Preventing of uninstallation would be a big sabotage against your customer. Do you really want it?
By the way, your fragment of code is not well-formed XML. :-)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900