Microsoft's DirectX features a set of APIs (from the English "Application Programming Interfaces") that allow programs and apps for Windows to support all the features needed to use and create video games on Microsoft hardware platforms. Normally DirectX updates automatically thanks to the Windows Update service, but it is also possible to update manually based on the version of Windows in use.
Steps
Method 1 of 5: Use Windows Update

Step 1. Click on the Windows "Start" button and type the keyword "update" into the search field

Step 2. Click the "Windows Update" icon, then click the "Change Settings" link listed in the left pane of the window
If you are using Windows 8, click on the "Update Options" link

Step 3. Select one of the available options to perform automatic update or check for new updates immediately
Select the "Download recommended updates in the same way as important updates" checkbox.

Step 4. Click the "OK" button, then provide the computer administrator account password
At this point you can resume using your computer normally, DirectX will be updated automatically through Windows Update as soon as a new update is made available.
Method 2 of 5: Install DirectX 11.1 for Windows 7 SP1 and Windows Server 2008 R2 SP1

Step 1. Access the webpage to download the update which also includes DirectX 11.1 for Windows 7 using the following link:
www.microsoft.com/it-it/download/details.aspx?id=36805.

Step 2. Click the "Download" button, then select the "Run" option when prompted
The operating system will install the latest version of DirectX available on the computer.
Method 3 of 5: Install DirectX 11.0 for Windows Vista SP2 and Windows Server 2008 SP2

Step 1. Visit one of the following URLs, based on the version of Windows you are using:
- Windows Vista:
- Windows Server 2008:
- Windows Server 2008 for 64-bit systems:

Step 2. Click the "Download" button, then select the "Run" option when prompted
The operating system will install the latest version of DirectX available on the computer.
Method 4 of 5: Install DirectX 9.0c for Windows XP and Windows Server 2003

Step 1. Visit the web page where you can download the DirectX 9.0c installation file using this link:
www.microsoft.com/it-it/download/details.aspx?id=34429.

Step 2. Click the "Download" button, then select the "Open" or "Run application from current location" option
The operating system will install the latest version of DirectX available on the computer.
Method 5 of 5: Troubleshooting

Step 1. Try installing the DirectX End-User Runtime program if you get the following error message while installing a game or application that requires DirectX 9: "The program could not be started because d3dx9_35.dll does not is present on your computer. To fix the problem, try reinstalling the program ". In many cases, installing the DirectX End-User Runtime app will fix this type of problem.
- Visit the URL https://www.microsoft.com/it-it/download/details.aspx?id=7087 and click on the "Download" button.
- At this point, click on the "Open" or "Run the application from current location" option to install the indicated program and solve the problem.

Step 2. Run the DirectX Diagnostic system utility if the problem occurs when you are playing a video game or watching a movie after installing a DirectX update
In many cases, this diagnostic tool can detect the cause of numerous DirectX-related problems.
Click on the "Start" button, type the keyword "dxdiag" into the search bar and press the "Enter" key. The DirectX Diagnostic program will run and will automatically detect any existing DirectX related problems on your system

Step 3. Try updating your video card drivers or installing a new one if updating DirectX hasn't solved the problem affecting a particular application or program
Sometimes the cause that prevents DirectX from working properly can be a malfunctioning or defective video card.