rayane888 Posted October 21, 2016 Share Posted October 21, 2016 [HIDE-THANKS] ;///////////////////////////////// ;//// Level-23 Hacktools ;//// ;//// Mr.888 ;//// ;//// Windows machin type Detection ;//// ;///////////////////////////////// MsgBox(0,'',_Result()) Func _Result() $strComputer = "." $objWMIService = ObjGet('winmgmts:{impersonationLevel=impersonate}!\\' & $strComputer & "\root\cimv2") $colChassis = $objWMIService.ExecQuery("Select * from Win32_SystemEnclosure") For $objChassis In $colChassis For $strChassisType In $objChassis.ChassisTypes If $strChassisType = 8 Or $strChassisType = 9 Or $strChassisType = 10 Then $detectOStype = "Laptop" ElseIf $strChassisType = 3 Or $strChassisType = 4 Or $strChassisType = 5 Or $strChassisType = 6 Or $strChassisType = 7 Then $detectOStype = "Desktop" Else $detectOStype = "Unknow" EndIf Next Next Return $detectOStype EndFunc [/HIDE-THANKS] Link to comment Share on other sites More sharing options...
Recommended Posts