VB6 or VBScript code to detect if running on VMware or Virtual Machines?

vbscript vb6 virtual-machine virtualbox virtualization

865 просмотра

2 ответа

Is there VB6 or VBScript code to detect if running on VMware or Virtual Machines?

The following links show the codes on other programming languages. Is there a way on VB6 or VBScript?

Detect virtualized OS from an application?

How to detect if my application is running in a virtual machine?

Detect if your program is running inside a Virtual Machine

Автор: Codename K Источник Размещён: 08.11.2019 11:00

Ответы (2)


2 плюса

Vmware have this article about different approaches:

Virtual BIOS DMI information The VMware virtual BIOS has many VMware-specific identifiers which programs can use to detect hypervisors. For the DMI string check, use the BIOS serial number and check for either string "VMware-" or "VMW" (for Mac OS X guests running on Fusion).

Here's a script for accessing the bios serial number:

http://www.vbforums.com/showthread.php?572678-RESOLVED-Getting-CPU-ID-and-BIOS-ID

Автор: FloatingKiwi Размещён: 20.08.2016 08:53

2 плюса

Confirmed working on Microsoft and VMware.

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,authenticationLevel=pktPrivacy}!\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")

For Each objItem in colItems
  strModel = objItem.Model
    If InStr(UCase(strModel), "VIRTUAL") Then
      WScript.Echo "VM"
    End If
Next
Автор: Randy Schuman Размещён: 21.08.2016 08:26
Вопросы из категории :
32x32