[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

is exe running in a VM or host platform

Posted on 2009-12-27
5
Medium Priority
?
490 Views
Last Modified: 2013-11-11
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
0
Comment
Question by:controlr
5 Comments
 
LVL 24

Expert Comment

by:ryder0707
ID: 26126757
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
 

Author Comment

by:controlr
ID: 26126826
my question was refering to how can i tell INSIDE THE EXE  if  its running in a VM or the natural host platform
 
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 26126881
See article here, this is how I do it.
http://www.codeproject.com/KB/system/VmDetect.aspx
 
0
 
LVL 21

Accepted Solution

by:
za_mkh earned 2000 total points
ID: 26127242
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
 
LVL 37

Expert Comment

by:Neil Russell
ID: 26127759
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question