Search code examples
c++cregistrywmibios

bios information in c++


I just want to known how to get BIO information in C++. I tried following option but each one has its drawback.

  1. From Registry: But I found some system where HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS is missing may be it is virtual machine.
  2. Using WMI: But It is not necessary that WMI will run on all the systems, because in certain cases either the service is disabled or the WMI object is missing!!

I need one permanent solution that gives me BIO information in c++.


Solution

  • Trying to detect if you are in a virtual OS is done in various ways and depends on the virtualization software being used.

    There are many different questions about this already on stackoverflow.

    In no particular order, here are some articles, they cover a variety of the different virtualization pieces used:

    Detect virtualized OS from an application?

    detect if application running on virtual box

    64-bit windows VMware detection

    How to identify that you're running under a VM?

    http://www.codeproject.com/Articles/9823/Detect-if-your-program-is-running-inside-a-Virtual