Jump to content

check state of computer


 Share

Recommended Posts

Func _osinfo()
    _uncheckall()
    Local $nOSName, $nOSVersion, $nOSServicePack, $nOfficeVersion, $OSs, $BIOS
    _ExcelSheetActivate($oExceluser, "cad")
    For $host In $aCompList
        $cI_CompName = $host
        Ping($cI_CompName, 20)
        If @error = 0 Then
            MsgBox(64, "", $cI_CompName)
            _GUICtrlStatusBar_SetText($StatusBar1, "checking - osinfo " & $cI_CompName)
            MsgBox(64, "", "getting computer info")
            _ComputerGetOSs($OSs)
            MsgBox(64, "", "array made")
            If IsArray($OSs) Then
                MsgBox(64, "", "array is oke")
;~              For $i = 1 To $OSs[0][0] Step 1
;~                  $nOSName = StringSplit($OSs[$i][0], "|")
;~                  $nOSName = $nOSName[1]
;~                  $nOSName = StringReplace($nOSName, "Microsoft ", "")
;~                  $nOSVersion = $OSs[$i][58]
;~                  $nOSServicePack = $OSs[$i][47]
;~                  If $nOSServicePack > 0 Then
;~                      $nOSName = $nOSName & " SP" & $nOSServicePack
;~                  Else
;~                      $nOSName = $nOSName
;~                  EndIf
;~                  _ExcelWriteCell($oExceluser, $nOSName, StringTrimLeft($cI_CompName, 4), 5)
;~                  _ExcelWriteCell($oExceluser, $nOSVersion, StringTrimLeft($cI_CompName, 4), 6)
;~                  _ExcelWriteCell($oExceluser, $OSs[$i][23], StringTrimLeft($cI_CompName, 4), 14)
;~                  _ExcelWriteCell($oExceluser, $OSs[$i][46], StringTrimLeft($cI_CompName, 4), 14)
;~              Next
            EndIf
        Else
            ContinueLoop
        EndIf
    Next
    _saveexcel()
    _statusbaridle()
EndFunc   ;==>_osinfo

the function _ComputerGetOSs($OSs) is from the CompInfo udf that I found here on the forum.

it is craching after:

MsgBox(64, "", "getting computer info")

edit: not only on hybernate, that was coincidence, but always the same computers.....

Link to comment
Share on other sites

:mellow:

Easy mistake

That function fails for me on quantumlength and quantumtype on 32 bit win 7

But it does say it was developed on win xp sp2

EDIT:

And Autoit2 I think

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...