Jump to content

Is it even possible ?


Babw_1
 Share

Recommended Posts

start with motherboard

;_GetComputerModel_2
;Author: rindeal
; Can return nothing relevant if machine is not a factory build
ConsoleWrite(_GetComputerModel() & @CRLF)

Func _GetComputerModel()
    Return RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS", "SystemProductName")
EndFunc   ;==>_GetComputerModel

 

I know that I know nothing

Link to comment
Share on other sites

  • Moderators

Here is a real simple example for getting your video card through WMI. I would suggest some research either on the forum or through Google on how to obtain different hardware components through WMI:

 

$WMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & @ComputerName & "\root\cimv2")
$aItems = $WMI.ExecQuery("SELECT * FROM Win32_VideoController")

For $element In $aItems
    ConsoleWrite($element.Name & @CRLF)
Next

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

hear more info

#include <WinAPISys.au3>
#include <WinAPIFiles.au3>

_GetPhysicallyRAM()
_GetDriveFIXED()
_GetDriveCDROM()

Func _GetPhysicallyRAM()
Local $aData = _WinAPI_GetPhysicallyInstalledSystemMemory()
ConsoleWrite('RAM => ' & $aData / 1024 / 1024  & " GB" & @CRLF)
EndFunc

Func _GetDriveFIXED()
Local $aData, $aDrive = DriveGetDrive('FIXED')
Local $aList[10]

For $i = 0 To UBound($aDrive) - 1
    $aList[$i] = ''
Next
If IsArray($aDrive) Then
    For $i = 1 To $aDrive[0]
        $aData = _WinAPI_GetDriveNumber($aDrive[$i])
        If IsArray($aData) Then
            $aList[$aData[1]] &= StringUpper($aDrive[$i]) & ' '
        EndIf
    Next
EndIf

For $i = 0 To UBound($aDrive) - 1
    If $aList[$i] Then
        ConsoleWrite('HD Drive' & $i & ' => ' & $aList[$i] & @CRLF)
    EndIf
Next

EndFunc

Func _GetDriveCDROM()
Local $aData, $aDrive = DriveGetDrive('CDROM')
Local $aList[10]

For $i = 0 To UBound($aDrive) - 1
    $aList[$i] = ''
Next
If IsArray($aDrive) Then
    For $i = 1 To $aDrive[0]
        $aData = _WinAPI_GetDriveNumber($aDrive[$i])
        If IsArray($aData) Then
            $aList[$aData[1]] &= StringUpper($aDrive[$i]) & ' '
        EndIf
    Next
EndIf
For $i = 0 To UBound($aDrive) - 1
    If $aList[$i] Then
        ConsoleWrite('CDROM Drive' & $i & ' => ' & $aList[$i] & @CRLF)
    EndIf
Next

EndFunc

 

I know that I know nothing

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...