How can I check through command-line the computer form(Desktop, notebook or All-in-one)?

Diogo

For a very specific reason I need to check the computer form factor(Desktop, Notebook or All-in-one) remotelly, using a command through the command-prompt, powershell or vbs(Windows 7/8 systems).

There is any way to do such thing?

Thanks in advance.

Harikrishnan

save it as info.vbs
go to script location from command prompt and type info.vbs , press enter

 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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I loop through all sub folder of FolderA and execute a command do check modified files

From Dev

How can I run ALL HTTP requests through Charles Web Debugging Proxy - including command line ones?

From Dev

How can I export ALL notes from Gnote to HTML through command line?

From Dev

How can I duplicate lines matching a pattern, and modify the second line, all in one command?

From Dev

How can I modify executable metadata through the command line?

From Dev

How can I delete a particular file through the command line?

From Dev

How can I list modules and check functions exist at the command line?

From Dev

How can I check for Visual Studio updates via the command line?

From Dev

How can I check for Visual Studio updates via the command line?

From Dev

How can I check the size of a folder from the Windows command line?

From Dev

How can I check if swap is active from the command line?

From Dev

How can I describe all tables in the database through one statement?

From Dev

How can I describe all tables in the database through one statement?

From Dev

How can I check if returned value is true in one line?

From Dev

How can I string replace results of a command in one line?

From Dev

How can I match parameters in command line with one regular expression?

From Dev

How can I install one language by command-line

From Dev

How can I install one language by command-line

From Dev

How can I get a list of all open windows in the command line?

From Dev

How can I get a list of all open windows in the command line?

From Dev

How can I pass all command line arguments to a program in a Makefile?

From Dev

How can I expand all variables at the command line in Zsh?

From Dev

How can I see all opened pull requests on command line?

From Dev

How can I run multiple codeception suites (but not all) in one command?

From Dev

How can I change all files prefixes in one command?

From Dev

How can I print all content of an array in one line?

From Dev

Is there anyway to check if I'm connected via a VPN through command line?

From Dev

How can I send a notification to a Windows 10 computer from the command line

From Dev

How can I pass the result of a local `curl` in the command line to a remote server in one line?

Related Related

  1. 1

    How can I loop through all sub folder of FolderA and execute a command do check modified files

  2. 2

    How can I run ALL HTTP requests through Charles Web Debugging Proxy - including command line ones?

  3. 3

    How can I export ALL notes from Gnote to HTML through command line?

  4. 4

    How can I duplicate lines matching a pattern, and modify the second line, all in one command?

  5. 5

    How can I modify executable metadata through the command line?

  6. 6

    How can I delete a particular file through the command line?

  7. 7

    How can I list modules and check functions exist at the command line?

  8. 8

    How can I check for Visual Studio updates via the command line?

  9. 9

    How can I check for Visual Studio updates via the command line?

  10. 10

    How can I check the size of a folder from the Windows command line?

  11. 11

    How can I check if swap is active from the command line?

  12. 12

    How can I describe all tables in the database through one statement?

  13. 13

    How can I describe all tables in the database through one statement?

  14. 14

    How can I check if returned value is true in one line?

  15. 15

    How can I string replace results of a command in one line?

  16. 16

    How can I match parameters in command line with one regular expression?

  17. 17

    How can I install one language by command-line

  18. 18

    How can I install one language by command-line

  19. 19

    How can I get a list of all open windows in the command line?

  20. 20

    How can I get a list of all open windows in the command line?

  21. 21

    How can I pass all command line arguments to a program in a Makefile?

  22. 22

    How can I expand all variables at the command line in Zsh?

  23. 23

    How can I see all opened pull requests on command line?

  24. 24

    How can I run multiple codeception suites (but not all) in one command?

  25. 25

    How can I change all files prefixes in one command?

  26. 26

    How can I print all content of an array in one line?

  27. 27

    Is there anyway to check if I'm connected via a VPN through command line?

  28. 28

    How can I send a notification to a Windows 10 computer from the command line

  29. 29

    How can I pass the result of a local `curl` in the command line to a remote server in one line?

HotTag

Archive