On Fri, 30 Oct 2009 23:29:47 +0200, "Hotmail_H_" <harpo_@hotmail.com>
wrote:
>Hi,
>
>is it somehow possible an application to know whether it runs in a virtual
>PC or on a 'normal' physically existing PC ?
>What would be the best method to detect a virtual PC ?
>
That is actually very difficult, but there are methods that might
work, at least for the majority of cases.
One is to use WMI calls to Windows and read things like the BIOS
name/version, the Disk maker etc.
For example if you ask for Win32_DiskDrive in a VMWare virtual machine
you will get this as Model: VMWare Virtual IDE Hard Drive
Win32_BIOS reports: VMWare + a long string of hex code
This is a clue to the fact that you are running in a virtual machine.
There are also other ways, for example you can get a more direct way
of detection by reading this:
http://www.invisiblethings.org/papers/redpill.html
I used this and made a detection application that properly detects
both VPC2007 and VMWare Workstation guests.
--
Bo Berglund (Sweden)