is exe running in a VM or host platform

i have a program, and depending on the VM platform it will processes different tasks.
the program is for windows only.
I need to know if i can find out if:
1. EXE is running in VM or the host mode
2. if VM, which kind or vm  (HyperV / VMWare, etc)

a CPU Process name that can be seen in task manager would be great!
TIA
controlrAsked:
Who is Participating?
 
za_mkhCommented:
You could do a WMI query to see the system board details. If it comes up as VMware Virtual Platform, etc, you then know it is virtual. Well that's how I do it to run scripts, etc for imaging processes. I wrote a little utilty in AutoIT that gets the info and writes it to the registry. I then use the values detected to work out what they are.  Since I am not at work, I don't have the code at hand, but this puts you on the right path
http://communities.vmware.com/message/961477 
http://www.msfn.org/board/virtual-machine-and-oem-license-windows-t88477.html
 
0
 
ryder0707Commented:
1. EXE is running in VM or the host mode
Each VM will be running its own OS, so all the exe is basically run inside the VM

2. if VM, which kind or vm  (HyperV / VMWare, etc)
I recommend the free esxi4
0
 
controlrAuthor Commented:
my question was refering to how can i tell INSIDE THE EXE  if  its running in a VM or the natural host platform
 
0
 
Neil RussellTechnical Development LeadCommented:
See article here, this is how I do it.
http://www.codeproject.com/KB/system/VmDetect.aspx
 
0
 
Neil RussellTechnical Development LeadCommented:
As stated in the article referenced by the answer you accepted, DO NOT rely on the BIOS information to see if you are in a VM. It can be configured to pass the HOST information and NOT the VM info thus giving you a false belief that you are on a physical machine.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.