Why would you use a CA for this??
Use the launch condition, nice and easy.
Custom Action, Type 19 should do it. No need to script it.
If you are using the InstallShield Editor, then select Custom Actions and Sequences, right click Custom Actions and select New Error. Then right click the newly created custom action and select Custom Action Wizard.
Sign up today to participate,
stay informed, earn points and establish a reputation for yourself!