camilla Posted August 1, 2015 Share Posted August 1, 2015 I found this code in the forum to Detect running in Virtual Machine I want to re-write it into vb.net if it is possiblethis is the code :------------------------------------------------------expandcollapse popupOpt("MustDeclareVars", 1) ;Converted from VBS script found @ below address... ;http://blogs.technet.com/b/tonyso/archive/2010/05/13/how-to-tell-if-you-are-in-a-vm-using-script.aspx ;THAT1ANONYMOUSEDUDE Marlboroloco@gmail.com If _VCheck() Then MsgBox(0, "", "True") Else MsgBox(0, "", "False") EndIf Func _VCheck() Local $strComputer = ".", $sMake, $sModel, $sBIOSVersion, $bIsVM, $sVMPlatform Local $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") If IsObj($colItems) Then For $objItem In $colItems ;MsgBox(0,"","Name: " & $objItem.Name) $sMake = $objItem.Manufacturer $sModel = $objItem.Model Next EndIf $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", 0x10 + 0x20) If IsObj($colItems) Then For $objItem In $colItems ;MsgBox(0,"",$objItem.BIOSVersion(0)) $sBIOSVersion = $objItem.SMBIOSBIOSVersion Next EndIf $bIsVM = False $sVMPlatform = "" MsgBox(0, "", "Manufacturer=" & $sMake) MsgBox(0, "", "Model=" & $sModel) MsgBox(0, "", "BIOSVersion=" & $sBIOSVersion) If $sModel = "Virtual Machine" Then ; Microsoft virtualization technology detected, assign defaults $sVMPlatform = "Hyper-V" $bIsVM = True ; Try to determine more specific values Switch $sBIOSVersion Case "VRTUAL - 1000831" $bIsVM = True $sVMPlatform = "Hyper-V 2008 Beta or RC0" Case "VRTUAL - 5000805", "BIOS Date: 05/05/08 20:35:56 Ver: 08.00.02" $bIsVM = True $sVMPlatform = "Hyper-V 2008 RTM" Case "VRTUAL - 3000919" $bIsVM = True $sVMPlatform = "Hyper-V 2008 R2" Case "A M I - 2000622" $bIsVM = True $sVMPlatform = "VS2005R2SP1 or VPC2007" Case "A M I - 9000520" $bIsVM = True $sVMPlatform = "VS2005R2" Case "A M I - 9000816", "A M I - 6000901" $bIsVM = True $sVMPlatform = "Windows Virtual PC" Case "A M I - 8000314" $bIsVM = True $sVMPlatform = "VS2005 or VPC2004" EndSwitch ElseIf $sModel = "VMware Virtual Platform" Then ; VMware detected $sVMPlatform = "VMware" $bIsVM = True ElseIf $sModel = "VirtualBox" Then ; VirtualBox detected $bIsVM = True $sVMPlatform = "VirtualBox" Else ; This computer does not appear to be a virtual machine. EndIf ; Set the return value If $bIsVM Then MsgBox(0, "", "IsVirtualMachine=True") MsgBox(0, "", "VirtualMachinePlatform=" & $sVMPlatform) Else MsgBox(0, "", "IsVirtualMachine=False") EndIf Return $bIsVM EndFunc ;==>_VCheck-----------------------------------------------------------------------------------------------------thank you in advance Link to comment Share on other sites More sharing options...
Danyfirex Posted August 1, 2015 Share Posted August 1, 2015 I need that someone help me to eat. Just read a little bit about NET. then, write it yourself.Saludos camilla 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
camilla Posted August 1, 2015 Author Share Posted August 1, 2015 I am trying to do what you propose,but I need that code now Link to comment Share on other sites More sharing options...
Danyfirex Posted August 2, 2015 Share Posted August 2, 2015 Pay for.Saludos camilla 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
camilla Posted August 2, 2015 Author Share Posted August 2, 2015 haahahhahhhhNo I don't have money, if you want to help me okay if no please don't spam my topic Link to comment Share on other sites More sharing options...
Danyfirex Posted August 2, 2015 Share Posted August 2, 2015 I am trying to do what you propose,but I need that code nowUps sorry.and yes, I'm an spammer.Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
camilla Posted August 2, 2015 Author Share Posted August 2, 2015 upupupup Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now