• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

AutoIT Windows machin type Detection

Status
Not open for further replies.

rayane888

LvL-23
User
Joined
Dec 5, 2011
Messages
131
Reputation
0
Reaction score
735
Points
93
Credits
0
‎13 Years of Service‎
44%
[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]

 
Status
Not open for further replies.
Back
Top