Using the DirectXSetup Function
Applications and games that depend on DirectX use the DirectXSetup API function to install their system components on top of an existing Windows installation. This function updates the display and audio drivers to support DirectX (if required) during the DirectX installation process. DirectXSetup is provided to each application from the Dsetup.dll that is included with your product. You can find the declarations for DirectSetup in Dsetup.h.
Applications that use DirectXSetup must distribute the entire contents of the Redist directory, not just the contents of the \Redist\Directx directory. Although DirectXSetup allows you to install a single DirectX component, such as DirectDraw®, it is not recommended; the space-saving advantages are minimal because of the interdependent design of DirectX components. Applications must distribute the entire DirectX system, even if they use only one DirectX component.