I thought I'd share this with you as a "snippet" because it may just come in useful. I am currently using it for Disk Manager As far as I know, it works fine - fingers crossed. Global $strComputer = "."
Global $objWMIService, $oMyError
Global $colTemp
$oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\WMI")
$colTemp = $objWMIService.ExecQuery("SELECT * FROM MSStorageDriver_ATAPISmartData")
For $objItem In $colTemp
$strVendo
I know this is an old topic.
The difference in location can be expained.
You have to fine the corresponding dataset by ID.
Please see attached code.
#RequireAdmin
Dim $strComputer = "."
Dim $objWMIService, $oMyError
Dim $colTemp
If Not @Compiled Then
ConsoleWrite("HDD Temperature(s): " & _WMI_GetATAPISmartData() & @CRLF)
EndIf
Func _MyErrFunc()
Local $HexNumber = Hex($oMyError.number, 8)
MsgBox(0, "COM Error Test", "We intercepted a COM Error !" & @CRLF & @CRLF & _