The first thing you need is a decent MSI authoring tool. The Package and Deployment Wizard (PDW) serves a basic purpose but for anything beyond that, you'll need a decent tool.
Next, you need an editor for directly editing MSIs, for those occasions where you don't need the "fluff" of the authoring tools. There's Orca - which you probably already have in an MSI if you installed the entire VS suite. I prefer InstEdit
but either will suffice.
Next, you need to go to MSDN and research the use of the AppSearch (AS) and LaunchCondition (LC) actions. Basically, AS will populate a property which you can then test with LC. Note that, as VS's PDW has as its base a very elderly version of Wise for Windows Installer, it may well be that it has the same issue which other versions of Wise tools have, even to this day, where these two actions are incorrectly sequenced, such that LC appears before AS. Altering the InstallExecuteSequence and InstallUISequence tables so that AS comes before LC fixes that.