See Pascal Scripting: Check Parameters for more information on boolean expressions and see Uninstallable for an example.