如何检测我的应用程序是否在虚拟机中运行? [英] How to detect if my application is running in a virtual machine?
本文介绍了如何检测我的应用程序是否在虚拟机中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何检测(.NET 或 Win32)我的应用程序是否在虚拟机中运行?
How can I detect (.NET or Win32) if my application is running in a virtual machine?
推荐答案
根据 Virtual PC Guy的博文检测微软虚拟机",您可以使用 WMI 来检查主板的制造商.在 PowerShell 中:
According to Virtual PC Guy's blog post "Detecting Microsoft virtual machines", you can use WMI to check the manufacturer of the motherboard. In PowerShell:
(gwmi Win32_BaseBoard).Manufacturer -eq "Microsoft Corporation"
这篇关于如何检测我的应用程序是否在虚拟机中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文