How to make installer to install DirectX?
I want to know how to make installer which not only checks whether DirectX is installed if yes then which version if not then install Direct X in my system.Earlier I did the same for .Net framework using WIX bootstrapper and that is working fine.But I am really confuse for Direct X.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Anurag SarkarRank #1,049 · 1.8K reputationPosted Apr 14, 2014, 12:09 AM EDT
You can use the following code for getting the Direct X Version but its bit slow you need to wait after running the code.. It will take 5-10 sec for getting the directX version.
private void button1_Click(object sender, EventArgs e)
{
Process.Start("dxdiag", "/x dxv.xml");
while (!File.Exists("dxv.xml"))
Thread.Sleep(1000);
XmlDocument doc = new XmlDocument();
doc.Load("dxv.xml");
XmlNode dxd = doc.SelectSingleNode("//DxDiag");
XmlNode dxv = dxd.SelectSingleNode("//DirectXVersion");
textBox1.Text= dxv.InnerText.Split(' ')[1];
}
gunjan aroraRank #8,160 · 227 reputationPosted Apr 14, 2014, 1:13 AM EDT