Time Required: Installing DirectX usually takes less than 15 minutes
Here's How:
Search for the latest version of DirectX on Microsoft's site.
Click the link in the search results named DirectX End-User Runtime Update or DirectX End-User Runtimes (MM YY).
Note: Typically, the DirectX End-User Runtime Update link will be your best option since it's the latest release and only installs the DirectX files you are missing. Some users prefer to download and install the entire DirectX package by choosing the DirectX End-User Runtimes (MM YY) link with the latest month and year available.
Note: The DirectX SDK download options are not recommended.
Complete the DirectX installation by following any directions from Microsoft's website or from the DirectX installation program.
Note: The same DirectX download applies to all Windows operating systems - Windows 7, Windows Vista, Windows XP, etc. Whatever files are missing - be them DirectX 11, DirectX 10, DirectX 9, etc. - will be replaced as necessary. See Tip #1 at the bottom of the page for more information about DirectX in specific versions of Windows.
Restart your computer, even if you're not prompted to do so.
After restarting your computer, test to see if updating to the latest version of DirectX corrected the problem you were having.
Tips:
DirectX 11 is supported in Windows 7 and in Windows Vista with a platform update available here for 32-bit versions of Vista and here for 64-bit versions.
DirectX 10 is supported in Windows 7 and Windows Vista.
DirectX 9 is supported in Windows 7, Windows Vista, and Windows XP. This is the latest version of DirectX that's compatible with Windows XP.
However, as I mentioned in Step 3, the same DirectX download applies to all versions of Windows, no matter what the maximum DirectX version is supported.