R – Installing DirectX with application MSI – VS2008

directxinstallationvisual-studio-2008windowswindows-installer

The application supports Windows XP, Vista, and Windows 7 but need DirectX libraries in order to work properly. I have the DirectX 9.0C Redistributable package and want to include it in my MSI installer created with a Visual Studio 2008 setup project.

Two pronged question:
How do I include the DirectX 9.0C package wiht my MSI?
Will the DirectX 9.0C package ignore Vista and Windows 7 automatically?

Best Answer

Do not include it in your msi package but execute it as a custom action or before the installation starts. Installing it in Vista or Win7 won't cause any issues.