how to discern between Laptop and Desktop?
#1
Posted 14 August 2012 - 11:44 PM
Commands?or Condition
THX
#2
Posted 14 August 2012 - 11:53 PM
getSystemEnclosureType()=="Laptop" getSystemEnclosureType()=="Desktop"
#5
Posted 29 August 2012 - 07:33 AM
getSystemEnclosureType()=="Laptop" getSystemEnclosureType()=="Desktop"
#6
Posted 29 August 2012 - 08:19 AM
Dependant of | Architecture Tab and Hardware [scrowl down inside the combo box, and Select: getSystemEnclosuretype()]!
If you want you can change the condition manually and write: getSystemEnclosuretype()=="Laptop"
Because informations are based on your current Hardware and Operating System!
Cheers
This post has been edited by myselfidem: 30 August 2012 - 01:30 AM
#7
Posted 30 August 2012 - 04:23 AM
no detected laptop
in condition Hide
#8
Posted 30 August 2012 - 04:29 AM
See the information screen I am providing? Make one of those too please.
Attached File(s)
-
Capture.PNG (35.18K)
Number of downloads: 4
This post has been edited by Kelsenellenelvian: 30 August 2012 - 04:31 AM
#9
Posted 01 September 2012 - 05:06 AM
WMI Tasks: Computer Hardware
How Can I Determine if a Computer is a Laptop or a Desktop Machine?
Regards
*Edit: @honestvip
You can try this vbs file. Copy and past this one with notepad and save as SystemEnclosureType.vbs
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colChassis = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objChassis in colChassis
For Each strChassisType in objChassis.ChassisTypes
Select Case strChassisType
Case 1
Wscript.Echo "Other"
Case 2
Wscript.Echo "Unknown"
Case 3
Wscript.Echo "Desktop"
Case 4
Wscript.Echo "Low Profile Desktop"
Case 5
Wscript.Echo "Pizza Box"
Case 6
Wscript.Echo "Mini Tower"
Case 7
Wscript.Echo "Tower"
Case 8
Wscript.Echo "Portable"
Case 9
Wscript.Echo "Laptop"
Case 10
Wscript.Echo "Notebook"
Case 11
Wscript.Echo "Handheld"
Case 12
Wscript.Echo "Docking Station"
Case 13
Wscript.Echo "All-in-One"
Case 14
Wscript.Echo "Sub-Notebook"
Case 15
Wscript.Echo "Space Saving"
Case 16
Wscript.Echo "Lunch Box"
Case 17
Wscript.Echo "Main System Chassis"
Case 18
Wscript.Echo "Expansion Chassis"
Case 19
Wscript.Echo "Sub-Chassis"
Case 20
Wscript.Echo "Bus Expansion Chassis"
Case 21
Wscript.Echo "Peripheral Chassis"
Case 22
Wscript.Echo "Storage Chassis"
Case 23
Wscript.Echo "Rack Mount Chassis"
Case 24
Wscript.Echo "Sealed-Case PC"
Case Else
Wscript.Echo "Unknown"
End Select
Next
Next
Testing on your Laptop you must find also the result!
This post has been edited by myselfidem: 01 September 2012 - 08:28 AM
#10
Posted 09 September 2012 - 11:32 PM
testing in to laptop
information
SystemEnclosuretype()=="Desktop"
#11
Posted 10 September 2012 - 12:45 AM
#12
Posted 10 September 2012 - 01:00 AM
Could you perhaps add those cases you just mentioned myselfidem? (At least the most common ones perhaps)
Your .vbs script gives me "Notebook" as result. Thought Laptop and Notebook would be the same.
This post has been edited by Dynaletik: 10 September 2012 - 01:02 AM
#13
Posted 10 September 2012 - 03:55 AM
Dynaletik, on 10 September 2012 - 01:00 AM, said:
Yes!
We can read here more informations about Laptop and Notebook:
Laptop
Quote
#14
Posted 12 September 2012 - 03:54 AM
Dynaletik, on 10 September 2012 - 01:00 AM, said:
Done!
You can try to apply this changes inside wmi.js and look if it works for you:
http://www.msfn.org/...ost__p__1011110
Regards
This post has been edited by myselfidem: 12 September 2012 - 05:38 AM
#15
Posted 12 September 2012 - 07:40 AM



Help
Back to top









