write a bootstrap exe that queries for prerequisites, and installs them if required, and then executes your MSI proper
.NET[
^]
SQL Server[
^]
Unfortunately, Microsoft don't conform to their own MSI standards, so you can't find the appropriate feature/component ID and use the MSI detection mechnism
Do NOT install them silently - they take AGES, and there's nothing more annoying/concerning than an exe just sat there eating cycles and disk-space