is exe running in a VM or host platform

Posted on 2009-12-27
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!
Question by:controlr
    LVL 24

    Expert Comment

    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

    Author Comment

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

    Expert Comment

    See article here, this is how I do it.
    LVL 21

    Accepted Solution

    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
    LVL 37

    Expert Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In vSphere 4 1 and 5.0, you can enable both Remote SSH and the ESXi Shell for management of hosts from the vSphere Client and from the Direct Console User Interface. You may have noticed that on enabling both Remote SSH and the ESXi Shell for man…
    This Tutorial covers a very basic and common question asked on Experts Exchange, "How Do I Clone or Copy a virtual machine in VMware vSphere Hypervisor ESX/ESXi 4.x, ESXi 5.0?" Using the following method, no third party tools are required or need…
    Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
    Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now