检查注册表以获取DirectX最终用户运行时 [英] check registry for DirectX End-User Runtime

查看:120
本文介绍了检查注册表以获取DirectX最终用户运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个安装程序,该程序检查注册表中未安装的软件/组件,并在需要时安装它们。我遇到的问题是,如果我在Windows的新副本上从DirectX最终用户运行时Web安装程序安装了最新的DirectX最终用户运行时,则需要正确运行的软件才能启动。(http://www.microsoft.com /en-au/download/details.aspx?id=35)。

I am creating an installer which checks the registry for softwares/ components that are not installed and installs them if needed. The problem I am having is that the software I need to run launches correctly if I install the latest DirectX End-User Runtime from the DirectX End-User Runtime web installer on a fresh copy of Windows(http://www.microsoft.com/en-au/download/details.aspx?id=35).

如果未安装,我得到的错误是由于d3dx9_43.dll,程序无法启动从您的计算机丢失。现在,即使在全新安装的Windows中,来自HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX的DirectX注册表项也会显示 4.09.00.0904作为版本密钥。

The error I get if not installed is "The program can't start because d3dx9_43.dll is missing from your computer". Now even in a fresh install of windows, the DirectX registry entry from HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX shows "4.09.00.0904" for the Version key.

所以我的问题是,我应该在哪里查看注册表以检查是否安装了DirectX最终用户运行时中的所有组件。

So my question is, where do I look in the registry to check whether all components from the DirectX End-User Runtime are installed.

真的很感谢您的帮助。

推荐答案

您没有提到所使用的安装程序,脚本或编程语言。

You didn't mention what installer, script, or programming language you were using. That would be helpful to know.

如果您不担心下载大小,最简单的方法就是始终盲目安装DirectX Runtime。

If you aren't worried about download size, the easiest thing might be to just always install the DirectX Runtime blindly. It won't hurt to install it if it's already there.

以下是您可以考虑的其他事项:

Here's some other things you can consider:

如果您使用的是Vista或更高版本(包括Win7,Win8,Server 2K8),则可能无需安装任何软件。由于这些操作系统可能预装了二进制文件。与XP SP2及更高版本相同。您的 Windows的新副本比XP更新吗?

If you are on Vista or later (including Win7, Win8, Server 2K8), then you likely don't need to install anything. As these operating systems likely ship with the binary pre-installed. Ditto for XP SP2 and later. Is your "fresh copy of Windows" something newer than XP?

另一个简单的想法是仅在Windows\System32或Windows Server 2003中搜索d3dx9_43.dll的存在。 Windows\SysWow64目录。

Another simple idea is to just search for the existence of d3dx9_43.dll in either the Windows\System32 or Windows\SysWow64 directory.

通过编程,您可以按照以下步骤检测DLL的安装程序的安装程序代码

Programatically, you can have your Installer code detect for the installation of the DLL as follows

#include <windows.h>
BOOL HasD3DX9()
{
    HMODULE hMod = LoadLibrary("d3dx9_43.dll");
    return (hMOD != NULL) ? TRUE : FALSE;
}

这篇关于检查注册表以获取DirectX最终用户运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆