如何确定与WMI OS平台? [英] How to determine OS Platform with WMI?

查看:162
本文介绍了如何确定与WMI OS平台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出是否有WMI中的位置,将返回的OS架构(即32位或64位),将跨Windows的所有版本。我想我已经想通了看着我Win2k8系统的时候,我发现以下内容:

I am trying to figure out if there is a location in WMI that will return the OS Architecture (i.e. 32-bit or 64-bit) that will work across "all" versions of Windows. I thought I had figured it out looking at my Win2k8 system when I found the following:

 Win32_OperatingSystem / OSArchitecture

我错了。它不会出现这个字段上WIN2K3系统的存在。哎呀!

I was wrong. It doesn't appear that this field exists on Win2k3 systems. Argh!

那么,有没有人知道另一场的WMI说:是同一个跨服务器版本?如果不是,大概是同一个注册表项是什么?我使用的一个工具,只允许我配置简单的现场查询,所以我不能使用复杂的脚本来执行。

So, is anyone aware of another field in WMI that "is" the same across server versions? If not, what about a registry key that is the same? I am using a tool that only allows me to configure simple field queries, so I cannot use a complex script to perform.

任何帮助将大大AP preciated!干杯...

Any help would be greatly appreciated! Cheers...

卡里

推荐答案

一段时间的搜索和测试后,我想出了一个修复/回答虽然它不正是我所期待的。从通过注册表似乎是在所有版本我在我的实验室进行WIN2K3和放大器一致执行查询; Win2k8。这里就是我从拉动信息:

After awhile of searching and testing, I've come up with a "fix/answer" although it's not exactly what I was hoping for. Performing the query from via the Registry appears to be consistent across all the version I have in my lab for Win2k3 & Win2k8. Here's where I am pulling the information from:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment

KEY: PROCESSOR_ARCHITECTURE

它显示x86或AMD64。它并不完美,但至少它给了我正确的答案每次。

It displays x86 or AMD64. It's not perfect, but at least it gives me the proper answer every time.

不过,如果有谁知道一个一致的类或注册表项,将输出32/64,32位/ 64位,或X86 / X64,我将不胜AP preciate的信息。

Still, if anyone knows a consistent 'Class' or Registry key that will output 32/64, 32-bit/64-bit, or X86/X64, I would greatly appreciate the information.

这篇关于如何确定与WMI OS平台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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