Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi How to check if pc is notebook? (https://www.delphipraxis.net/97323-how-check-if-pc-notebook.html)

Razor 8. Aug 2007 16:26


How to check if pc is notebook?
 
Yes how to check if a pc is notebook,or in other words how to check what kind of type the machine is?Is it a normal pc,pocket pc or a notebook?How can i check that with code?

And if that isnt possible notebooks have mobile cpus,how can i check if a cpu is mobile.



Thanks ! :)

Dunkel 8. Aug 2007 16:44

Re: How to check if pc is notebook?
 
If you undesrtand some words german look at this, otherwise use google-translation or similar services to look at this :wink: .

hathor 8. Aug 2007 17:41

Re: How to check if pc is notebook?
 
Liste der Anhänge anzeigen (Anzahl: 1)
You can download a DELPHI-Version of the following Program:

Source:

http://www.microsoft.com/technet/scr...4/hey0921.mspx


Delphi-Quellcode:

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

RWarnecke 8. Aug 2007 18:06

Re: How to check if pc is notebook?
 
At my desktop the script don't show a box. Why ? The select command show nothing.

hathor 8. Aug 2007 18:22

Re: How to check if pc is notebook?
 
Download and check it with Project1.exe.

RWarnecke 8. Aug 2007 18:29

Re: How to check if pc is notebook?
 
Liste der Anhänge anzeigen (Anzahl: 1)
In the Attachment is the Result !!

hathor 8. Aug 2007 18:40

Re: How to check if pc is notebook?
 
Liste der Anhänge anzeigen (Anzahl: 1)
WMI-Diagnoseprogramm
Ein neues Dienstprogramm zum Diagnostizieren und Beheben von Problemen mit dem WMI-Dienst

http://www.microsoft.com/germany/tec...p/wmidiag.mspx

Mackhack 8. Aug 2007 18:45

Re: How to check if pc is notebook?
 
What do they mean with Pizza Box?

hathor 8. Aug 2007 18:56

Re: How to check if pc is notebook?
 
http://en.wikipedia.org/wiki/Pizza_box_form_factor


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:44 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz