DirectX 安装目录

DirectX Install Directory

所以,我尝试安装 Microsoft DirectX 2010,当我在安装程序中设置目录时,我把它放到了我想要的错误目录中。现在,每次我打开安装程序时,它都没有给我一个更改目录的选项,它只是说继续并安装。如果有人对此有解决方案,那就太好了。

编辑:还忘了注意,当我将它安装在我的 D: 驱动器上时(它应该在 C: 上)我得到了错误代码 S1023

S1023 问题在 this post 中有详细说明。由于安装完全失败,并且它是基于古老的 MSI 之前的技术构建的,因此您需要手动清除旧安装。

  • 删除失败的安装目录

  • 使用regedit删除HKCU\Software\Microsoft\DirectX SDKHKLM\Software\Microsoft\DirectX SDK。如果您使用的是 x64 系统(我希望您是),也请删除 HKLM\SOFTWARE\WOW6432Node\Microsoft\DirectX SDK.

  • 编辑您的系统环境变量并删除 DXSDK_DIR.

    的条目

DirectX SDK 已弃用。如果您使用的是 VS 2012 或更高版本 - 或 - Windows 8.0 SDK 或更高版本,并且您使用的是 DirectX 11 或DirectX 12,那你就不需要了。参见 Microsoft Docs

There are a few cases where it's still legitimate to use the legacy DirectX SDK as covered in The Zombie DirectX SDK, but for the most part you should avoid using it for new projects.

如果您想让旧游戏正常运行,请尝试安装最新的 DXSETUP/DXWSETUP but keep in mind that it doesn't actually install DirectX at all. See Not So Direct Setup

更新:现在真的没有理由使用旧版 DirectX SDK。有关总体状态和详细信息,请参阅 Where is the DirectX SDK (2021 Edition)?