Yes it helped a lot, thank you again Friedrich
Right after the first "If" line, I added my own "If/Else" function. Now it checks the other program, and doesn't perform uninstalling if other program is still installed. Just like I wanted.

Recently I decided to change something in my patch. At first it checks a GUID entry when it's launched, and automatically sets the setup destination according to this GUID. User is also able to change the destination if they want. Currently I want to disable this. Is it possible to set the setup destination "read-only"? Because my installation can find where to install, I think it's unnecessary to allow users to change it.