How to detect if my application is running in a virtual machine?

前端 未结 10 1262
青春惊慌失措
青春惊慌失措 2020-11-28 05:52

How can I detect (.NET or Win32) if my application is running in a virtual machine?

10条回答
  •  渐次进展
    2020-11-28 06:20

    The easiest way I found to figure out whether my C# app is running on a vmware VM or not is to check the MAC address of the NIC card(s). If it's a VMware VM it would always be: 00:50:56:XX:YY:ZZ

    You may enumerate through the NICs as resolved here.

提交回复
热议问题