You need to define a registry search to see if your entry exists or not. The search name is actually an installer public property, so you can use it to set a condition.
To hide/show enable/disable controls from an MSI dialog you need to add a control condition, in Control Condition table. Make sure you define two control conditions for the same control, one to hide it if the condition is not met and one to show it when the condition is true.