https://www.microsoft.com/en-us/download/details.aspx?id=35
Q: How do I install DirectX 12 using the offline installer? A: Download the offline installer, run the executable file, accept the terms, choose the installation location, and install DirectX 12 on your system.
The files will extract. This takes 10–30 seconds.
While this does not install DirectX 12, it is often what users are actually looking for when games fail to launch. This package includes legacy components (DX9, DX10, DX11) that many modern games still require to run alongside DirectX 12. You can download this Offline Redistributable from the official Microsoft Download Center.
On this page, you will see a green "Download" button. Do not click it yet. That button downloads dxwebsetup.exe .