如何检测(.NET或Win32的),如果我的应用程序在虚拟机上运行?
How can I detect (.NET or Win32) if my application is running in a virtual machine?
根据虚拟PC专家的博客文章 检测Microsoft虚拟机的,您可以使用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"