Set values for the ExePackage/@DetectCondition attribute. For what it should be for a particular package, consult the documentation for the package. You'll probably need Bundle/RegistrySearch elements to set bundle variables for the conditions.
As a cross-reference, you can look at the XML files for any corresponding Visual Studio Bootstrapper package, typically at C:\Program Files\Microsoft Visual Studio 9.0\SDK\v2.0\Bootstrapper
or similar.