According to the XNA Installer website:
The presence of the DirectX 9.0c runtime files needed by XNA 4.0 is checked as well as
the XNA Framework 4.0 itself. If any of those two don't exist in the target system, the
installer will, depending on its configuration, either require the user to install them
or automatically install them.
In fact,
The installer's overhead can be as little as 460 KB (without XNA Framework integrated)
or 6.0 MB (including the XNA Framework 4.0) - less than the XNA Framework 4.0
redistributable alone - due to some clever compression tricks.
It looks to me like it will support your XNA 4.0 needs, albeit the project is built for SharpDeveloper, not VS2010. As robust as it is, the XNA Installer source code will be your best resource for achieving your goal. To answer your question, your best bet would be to check the WiX Documentation, and the tutorial linked from it. Alas, I can't post more than 2 hyperlinks. Have a look at the following resources (if you're new to WiX), and customize the XNA Installer source code (which is very well commented, by the way) however you need:
A great bottom-up tutorial describing more robust WiX installer creation.
https://stackoverflow.com/questions/471424/wix-tricks-and-tips
You'll be able to customize for use in VS2010 by changing a few variables and paths dependent on your personal setup, e.g. <WixToolPath>
, <WixTargetsPath>
and <WixTasksPath>
on lines 9-11 of MyGame.wixproj
. You could alternatively just build the .wixproj
from the VS command prompt using msbuild
after you customize to your liking. Hope this helps!