Jump to content

Recommended Posts

hard job

make first a list what you need , and then find how to get this

there are ready programs for this (I imagine you know)

the AutoIt v3 is a freeware BASIC-like scripting language

 

Link to post
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 post
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

 

Link to post
Share on other sites

I'd start with output from msinfo32:

RunWait ( 'msinfo32 /report "%temp%\report.txt"' )

The output is vaguely INI like with [SectionNames] but no Key=Value so you'd have to search or massage the data to get what you're looking for.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...