![]() |
|
Detect Virtual Machines - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Detect Virtual Machines (/Thread-Detect-Virtual-Machines) |
Detect Virtual Machines - M3 ™ - 09-18-2012 It's a long Way to detect if running on a Virtual Machine , not special , just for pass time Hope enjoy Code: ;=========================================
; Detect Virtual PC >> Vmware |VirtualBox
; Autor : M3
;=========================================
Func _DetectVirtualPC()
Local $sWMI, $sFind ,$sActive , $VM , $VBox
$VM = "VMwaretray.exe"
$VBox = "VboxSvc.exe"
$sWMI = ObjGet("winmgmts:")
$sFind = $sWMI.InstancesOf("win32_process")
For $sActive In $sFind
Select
Case $VM
If $sActive.Caption = $VM Then
Msgbox(0,"","Yeah I`m running on Vmware")
Exit
EndIf
Case $VBox
If $sActive.Caption = $VBox Then
Msgbox(0,"","Yeah I`m Running on VirtualBox")
Exit
EndIf
EndSelect
Next
EndfuncRE: Detect Virtual Machines - H4R0015K - 09-18-2012 which language is this?? oops..i didn't saw the section, my bad.. RE: Detect Virtual Machines - M3 ™ - 09-18-2012 Lol i'ts posted on AutoIt session xD RE: Detect Virtual Machines - 1234hotmaster - 09-19-2012 Nice code. But safer way is checking if first letter starts with V
RE: Detect Virtual Machines - spymare - 10-09-2012 here is a more secure way to do it: Quote:$SysInfo_Read = _RunStdOutRead("SystemInfo") |