[英]Distinguish between Windows Server 2012 Hyper-V versions
I'm writing an installer and need to be able to differentiate between machines running Windows Server 2012 with the Hyper-V feature enabled and the "baremetal" Hyper-V version, Microsoft Hyper-V Server 2012. 我正在编写安装程序,需要能够区分运行Windows Server 2012(启用了Hyper-V功能)的计算机和“裸机” Hyper-V版本Microsoft Hyper-V Server 2012。
For those who are unsure of the difference, this thread more or less covers it: 对于那些不确定差异的人,此线程或多或少涵盖了它:
Hyper-V Server 2012 vs Windows Server 2012 Standard Hyper-V Server 2012与Windows Server 2012 Standard
They both seem to have the same version/build numbers so checking this isn't much use. 它们似乎都具有相同的版本/内部版本号,因此检查此用处不大。 I'm guessing I need to do either a registry lookup or a WMI call but I don't know where to start.
我猜我需要执行注册表查找或WMI调用,但是我不知道从哪里开始。 Any suggestions?
有什么建议么?
Take a look at the OperatingSystemSKU method of the WMI Win32_OperatingSystem class. 看一下WMI Win32_OperatingSystem类的OperatingSystemSKU方法。
The value should be 0x2A (decimal 42) for Hyper-V Server, I believe. 我相信,对于Hyper-V服务器,该值应为0x2A(十进制42)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.