I have products - ProductA and ProductB - that I install using the installer created with WIX toolkit. If I install ProductA it updated the environment path to add C:\MyEnvPath. ProductB will also add C:\MyEnvPath if it is not already present.
ProductA is installed at C:\MyEnvPath\ProductAPath ProductB is installed at C:\MyEnvPath\ProductBPath
When I uninstall ProductA, it must check if C:\MyEnvPath has any other folder except C:\MyEnvPath\ProductAPath. If there is a folder (C:\MyEnvPath\ProductBPath), then do not remove the path.
If there is no other folder except C:\MyEnvPath\ProductAPath, then remove the path from environment variable.
How do I modify the uninstaller setting to do that?
Updating the 'Permanent' attribute to 'yes' in the line below will never remove the environment path which is not what is required. I require that 'Permanent' should be no but removal of the path should be conditional.