Jump to content

Computer Info UDF's


 Share

Recommended Posts

@blackdove

Is that the only function the only one that has some OS differences?

I am glad to see some new and active interest in my project. I will look into adding the environment variables, and system drivers. There are a ton of other things to add as well. :-)

@melkortheevil

Yes you have to have admin rights. I am glad you have figured that out.

Is there any special time at which this error occurs?

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • Moderators

@melkortheevil

Yes you have to have admin rights. I am glad you have figured that out.

Or at least have the admin set them for you.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

not sure about that being the only difference... I havent used the full gambit of functions yet (mostly adding them as needed to get client info back.)

I'll pass the code I'm currently using in the client program I wrote up if that helps.

#include <GuiConstants.au3>#include <GuiCombo.au3>#Include <GuiList.au3>#include <Array.au3>#include <File.au3>#include <CompInfo.au3>#Include <Date.au3>#Include <GuiTreeView.au3>#include <_XMLDomWrapper.au3>Dim $Update[1] Dim $UpdateID[1] Dim $Date[1] Dim $AddRemove[1]Dim $aArray[1]Dim $Version="1.0.0.0"Dim $UpdateSession, $UpdateSearcher, $searchResult, $colHistory, $ImportFile = ""Dim Const $txtwidth = 280, $txtheight = 20Dim Const $txtxoffset = 20, $txtyoffset = 20Dim $txtypos = $txtyoffsetDim $PanelIf $CmdLine[0] == 1 Then   ExtractToXML($CmdLine[1])   ExitElse    Dim $TreeX,$TreeY,$TreeWidth,$TreeHeight        $TreeX=240  $TreeY=10   $TreeWidth=640-220-30   $TreeHeight=460     ; Main Dialog   Dim $maindlg = GUICreate("System Information : Local Computer", 640,540, -1, -1, $WS_VISIBLE + $WS_SYSMENU, $WS_EX_TOOLWINDOW ) GUISetFont(9, 400, 0, "Sans Serif")     $radio1 = GUICtrlCreateRadio ("Local Computer", 10, 10, 120, 20)    $radio2 = GUICtrlCreateRadio ("XML report", 10, 40, 120, 20)    GUICtrlSetState ($radio1, $GUI_CHECKED) GUICtrlSetState ($radio2, $GUI_DISABLE)     $treeview       = GUICtrlCreateTreeView(10, 70, 220,390, BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  ; Main  $MainItem       = GUICtrlCreateTreeViewitem(@ComputerName, $treeview)   _GUICtrlTreeViewSetIcon($treeview, $MainItem, "shell32.dll", 111)                   GUICtrlSetState($MainItem, $GUI_FOCUS)  GUICtrlSetColor(-1, 0xC00000)   ;Operating System   $OperatingSystemItem    = GUICtrlCreateTreeViewitem("Operating System", $MainItem)  _GUICtrlTreeViewSetIcon($treeview, $OperatingSystemItem, "shell32.dll", 94) GUICtrlSetColor(-1, 0x0000C0)   GUICtrlSetState($OperatingSystemItem, $GUI_DEFBUTTON)   $ProcessesItem          = GUICtrlCreateTreeViewitem("Processes", $OperatingSystemItem)  _GUICtrlTreeViewSetIcon($treeview, $ProcessesItem, "shell32.dll", 72)   $ServicesItem           = GUICtrlCreateTreeViewitem("Services", $OperatingSystemItem)   _GUICtrlTreeViewSetIcon($treeview, $ServicesItem, "filemgmt.dll", 0)    $DependantServicesItem  = GUICtrlCreateTreeViewitem("Dependant Services", $OperatingSystemItem) _GUICtrlTreeViewSetIcon($treeview, $DependantServicesItem, "filemgmt.dll",0)    $SystemDriversItem      = GUICtrlCreateTreeViewitem("System Drivers", $OperatingSystemItem)     _GUICtrlTreeViewSetIcon($treeview, $SystemDriversItem, "shell32.dll",90)    ; Software items    $SoftwareItem    = GUICtrlCreateTreeViewitem("Software", $MainItem) _GUICtrlTreeViewSetIcon($treeview, $SoftwareItem, "shell32.dll", 11)    GUICtrlSetColor(-1, 0x0000C0)   GUICtrlSetState($SoftwareItem, $GUI_DEFBUTTON)  $InstalledPrograms  = GUICtrlCreateTreeViewitem("Installed Programs", $SoftwareItem)    _GUICtrlTreeViewSetIcon($treeview, $InstalledPrograms, "shell32.dll", 162)  $SharesItem         = GUICtrlCreateTreeViewitem("Shares", $SoftwareItem)    _GUICtrlTreeViewSetIcon($treeview, $SharesItem, "filemgmt.dll", 1)  $StartupItem        = GUICtrlCreateTreeViewitem("Startup", $SoftwareItem)   _GUICtrlTreeViewSetIcon($treeview, $StartupItem, "shell32.dll", 112)    $OSItem             = GUICtrlCreateTreeViewitem("OS Info", $SoftwareItem)   _GUICtrlTreeViewSetIcon($treeview, $OSItem, "shell32.dll", 113) $PrintJobItem       = GUICtrlCreateTreeViewitem("Print Jobs", $SoftwareItem)    _GUICtrlTreeViewSetIcon($treeview, $PrintJobItem, "shell32.dll", 136)   $WindowsUpdatesItem = GUICtrlCreateTreeViewitem("Windows Updates", $SoftwareItem)   _GUICtrlTreeViewSetIcon($treeview, $WindowsUpdatesItem, "shell32.dll", 46)  ; Hardware items    $Hardwareitem    = GUICtrlCreateTreeViewitem("Hardware", $MainItem)     _GUICtrlTreeViewSetIcon($treeview, $Hardwareitem, "hdwwiz.cpl", 0)  GUICtrlSetColor(-1, 0x0000C0)   GUICtrlSetState($hardwareitem, $GUI_DEFBUTTON)    ; Expand the "Display"-item and paint in bold $DrivesItem         = GUICtrlCreateTreeViewitem("Drive Information", $Hardwareitem)     _GUICtrlTreeViewSetIcon($treeview, $DrivesItem, "shell32.dll", 53)  $ProcessorItem      = GUICtrlCreateTreeViewitem("Processor Information", $Hardwareitem) _GUICtrlTreeViewSetIcon($treeview, $ProcessorItem, "regwizc.dll", 4)    ; Hardware items    $ConfigurationItem    = GUICtrlCreateTreeViewitem("Config", $MainItem)  _GUICtrlTreeViewSetIcon($treeview, $ConfigurationItem, "shell32.dll", 57)   GUICtrlSetColor(-1, 0x0000C0)   GUICtrlSetState($ConfigurationItem, $GUI_DEFBUTTON)    ; Expand the "Display"-item and paint in bold    $EnvironmentItem        = GUICtrlCreateTreeViewitem("Environment", $ConfigurationItem)  _GUICtrlTreeViewSetIcon($treeview, $EnvironmentItem, "shell32.dll", 135)    $SystemFilesItem    = GUICtrlCreateTreeViewitem("System Files", $ConfigurationItem) _GUICtrlTreeViewSetIcon($treeview, $SystemFilesItem, "shell32.dll", 1)  $BootINIItem        = GUICtrlCreateTreeViewitem("Boot ini", $SystemFilesItem)   _GUICtrlTreeViewSetIcon($treeview, $BootINIItem, "shell32.dll", 71)     Dim $button_Load = GUICtrlCreateButton("Load Results",(640/2) - 110,480,100, $txtheight)            Dim $button_Export = GUICtrlCreateButton("Export Results",(640/2) + 10,480,100, $txtheight)         GUICtrlSetState($MainItem,BitOr($GUI_EXPAND,$GUI_DEFBUTTON))    #endregion  While 1                 $msg = GUIGetMsg()          Select          Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED               WinSetTitle($maindlg, "", "System Information : Local Computer")                _GUICtrlTreeViewSetText ($treeview, $MainItem, @ComputerName)                               GUICtrlSetState($MainItem, $GUI_FOCUS)              GUICtrlDelete ($Panel)                  Sleep(250)          Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED               WinSetTitle($maindlg, "", "System Information : "&$ImportFile)                      SetXMLTitle($ImportFile)                                                GUICtrlSetState($MainItem, $GUI_FOCUS)              GUICtrlDelete ($Panel)                  Sleep(250)          Case $msg = $button_Load                $MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"              $var = FileOpenDialog ( "Select the results file.", $MyDocsFolder, "XML (*.xml)", 16)                   If($var) Then                   ImportFromXML($var)             EndIf               Case $msg = $button_Export                              $MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"              $var = FileSaveDialog ( "Choose a name.", $MyDocsFolder, "XML (*.xml)", 16)                 If($var) Then                   ExtractToXML($var)              EndIf           Case $msg = $ProcessesItem                          DisplayProcesses()          Case $msg = $ServicesItem                       DisplayServices()           Case $msg = $DependantServicesItem                  DisplayDependantServices()                              Case $msg = $SystemDriversItem              DisplaySystemDrivers()          Case $msg = $InstalledPrograms              DisplayInstalledSoftware()          Case $msg = $SharesItem             DisplayShares()         Case $msg = $StartupItem                DisplayStartup()            Case $msg = $OSItem             DisplayOSInformation()              Case $msg = $PrintJobItem               DisplayPrintJobs()              Case $msg = $WindowsUpdatesItem                             DisplayUpdates()                Case $msg = $DrivesItem             DisplayDrives()                         Case $msg = $ProcessorItem              DisplayProcessors()         Case $msg = $EnvironmentItem                DisplayEnvironmentVars()            Case $msg = $BootINIItem                DisplayBootINI()            Case $msg = $GUI_EVENT_CLOSE    ; Window closed             ExitLoop        EndSelect   WEndEndIf#region Xtract, Retrival and DisplayFunc ImportFromXML($file)  If FileExists($file) Then       While @error = 0            $ret = _XMLFileOpen ($ImportFile)           If $ret =0 Then             Exit            Else                $ImportFile = $file             GUICtrlSetState ($radio2, $GUI_ENABLE)              GUICtrlSetState ($radio2, $GUI_CHECKED)             WinSetTitle($maindlg, "", "System Information : "&$file)                SetXMLTitle($file)              GUICtrlSetState($MainItem, $GUI_FOCUS)              GUICtrlDelete ($Panel)                  Sleep(250)          EndIf           Return      WEnd        MsgBox(4096, "Error", _XMLError ())         GUICtrlSetState ($radio2, $GUI_DISABLE)         EndIfEndFuncFunc ExtractToXML($filepath)    $file = FileOpen($filepath, 2)  If $file = -1 Then      MsgBox(0, "Error", "Unable to write to file.")      Exit    EndIf   SplashTextOn("Extracting to XML", "Initializing Extraction"&@LF, 300, 100, -1, -1, 32, "", 12)  GUISetState (@SW_DISABLE, $maindlg)     GUISetCursor(15,1)  FileWriteLine($file, "<?xml version=""1.0"" encoding=""UTF-8""?>")  FileWriteLine($file, "<Report Computer="""&@ComputerName&""" Date="""&_NowCalcDate()&""" Version="""&$Version&""">")        FileWriteLine($file, "  <OperatingSystem>")         _XML_ExtractProcesses($file)    _XML_ExtractServices($file) _XML_ExtractDependantServices($file)    _XML_ExtractSystemDrivers($file)        FileWriteLine($file, "  </OperatingSystem>")            FileWriteLine($file, "  <Software>")        _XML_ExtractShares($file)       _XML_ExtractStartup($file)  _XML_ExtractOSInformation($file)    _XML_ExtractPrintInfo($file)    _XML_ExtractUpdateInformation($file)    _XML_ExtractInstalledSoftware($file)    FileWriteLine($file, "  </Software>")           FileWriteLine($file, "  <Hardware>")    _XML_ExtractDriveInformation($file)         _XML_ExtractProcessorInformation($file)     FileWriteLine($file, "  </Hardware>")           FileWriteLine($file, "  <Configuration>")       _XML_ExtractEnvironmentVariables($file) _XML_ExtractBootINI($file)  FileWriteLine($file, "  </Configuration>")          FileWriteLine($file, "</Report>")           FileClose($file)    SplashOff()             GUISetCursor(-1,1)  GUISetState (@SW_ENABLE, $maindlg)  EndFuncFunc WriteProperXML($string)     $string = StringReplace($string,'&', "&amp;")   $string = StringReplace($string,"'", "&apos;")  $string = StringReplace($string,"", "&apos;")       $string = StringReplace($string,'"', "&quot;")  $string = StringReplace($string,'<', "&lt;")    $string = StringReplace($string,'>', "&gt;")    $string = StringReplace($string,'', " ")        $string = StringReplace($string,'', " ")        $string = StringReplace($string,'', " ")        $string = StringReplace($string,'\', " ")   $string = StringReplace($string,'®', " ")      return $stringEndFuncFunc SetXMLTitle($file)    If FileExists($file) Then       $ret = _XMLFileOpen($file)          Dim $aAttrName[2], $aAttrValue[2], $node                $node = _XMLGetAllAttrib("//Report",$aAttrName,$aAttrValue )        If(IsArray($aAttrValue)) Then           _GUICtrlTreeViewSetText ($treeview, $MainItem, $aAttrValue[0] & " : " &$aAttrValue[1])                          EndIf   EndIf   EndFunc#region Operating System#region ProcessesFunc _XML_ExtractProcesses($file)   ControlSetText ("Extracting to XML", "", "Static1", "Installed Software")   Dim $Items  _ComputerGetProcesses($Items)       FileWriteLine($file, "  <Processes>")           For $i = 1 To $Items[0][0] Step 1                   FileWriteLine($file, "      <Process Name="""&$Items[$i][0]&""">")      FileWriteLine($file, "          <CommandLine>"&$Items[$i][1]&"</CommandLine>")      FileWriteLine($file, "          <CreationClassName>"&$Items[$i][2]&"</CreationClassName>")      FileWriteLine($file, "          <CreationDate>"&$Items[$i][3]&"</CreationDate>")        FileWriteLine($file, "          <Description>"&$Items[$i][4]&"</Description>")      FileWriteLine($file, "          <CSCreationClassName>"&$Items[$i][5]&"</CSCreationClassName>")      FileWriteLine($file, "          <CSName>"&$Items[$i][6]&"</CSName>")        FileWriteLine($file, "          <ExecutablePath>"&$Items[$i][7]&"</ExecutablePath>")        FileWriteLine($file, "          <ExecutionState>"&$Items[$i][8]&"</ExecutionState>")        FileWriteLine($file, "          <Handle>"&$Items[$i][9]&"</Handle>")        FileWriteLine($file, "          <HandleCount>"&$Items[$i][10]&"</HandleCount>")     FileWriteLine($file, "          <KernelModeTime>"&$Items[$i][11]&"</KernelModeTime>")       FileWriteLine($file, "          <MaximumWorkingSetSize>"&$Items[$i][12]&"</MaximumWorkingSetSize>")     FileWriteLine($file, "          <MinimumWorkingSetSize>"&$Items[$i][13]&"</MinimumWorkingSetSize>")     FileWriteLine($file, "          <OSCreationClassName>"&$Items[$i][14]&"</OSCreationClassName>")     FileWriteLine($file, "          <OSName>"&$Items[$i][15]&"</OSName>")       FileWriteLine($file, "          <OtherOperationCount>"&$Items[$i][16]&"</OtherOperationCount>")     FileWriteLine($file, "          <OtherTransferCount>"&$Items[$i][17]&"</OtherTransferCount>")       FileWriteLine($file, "          <PageFaults>"&$Items[$i][18]&"</PageFaults>")       FileWriteLine($file, "          <PageFileUsage>"&$Items[$i][19]&"</PageFileUsage>")     FileWriteLine($file, "          <ParentProcessID>"&$Items[$i][20]&"</ParentProcessID>")     FileWriteLine($file, "          <PeakPageFileUsage>"&$Items[$i][21]&"</PeakPageFileUsage>")     FileWriteLine($file, "          <PeakVirtualSize>"&$Items[$i][22]&"</PeakVirtualSize>")             FileWriteLine($file, "          <PeakWorkingSetSize>"&$Items[$i][23]&"</PeakWorkingSetSize>")               FileWriteLine($file, "          <Priority>"&$Items[$i][24]&"</Priority>")               FileWriteLine($file, "          <PrivatePageCount>"&$Items[$i][25]&"</PrivatePageCount>")               FileWriteLine($file, "          <ProcessID>"&$Items[$i][26]&"</ProcessID>")                     FileWriteLine($file, "          <QuotaNonPagedPoolUsage>"&$Items[$i][27]&"</QuotaNonPagedPoolUsage>")                       FileWriteLine($file, "          <QuotaPagedPoolUsage>"&$Items[$i][28]&"</QuotaPagedPoolUsage>")                     FileWriteLine($file, "          <QuotaPeakNonPagedPoolUsage>"&$Items[$i][29]&"</QuotaPeakNonPagedPoolUsage>")                       FileWriteLine($file, "          <QuotaPeakPagedPoolUsage>"&$Items[$i][30]&"</QuotaPeakPagedPoolUsage>")                         FileWriteLine($file, "          <ReadOperationCount>"&$Items[$i][31]&"</ReadOperationCount>")                           FileWriteLine($file, "          <ReadTransferCount>"&$Items[$i][32]&"</ReadTransferCount>")                         FileWriteLine($file, "          <SessionID>"&$Items[$i][33]&"</SessionID>")                         FileWriteLine($file, "          <Status>"&$Items[$i][34]&"</Status>")                               FileWriteLine($file, "          <ThreadCount>"&$Items[$i][35]&"</ThreadCount>")                             FileWriteLine($file, "          <UserModeTime>"&$Items[$i][36]&"</UserModeTime>")                               FileWriteLine($file, "          <VirtualSize>"&$Items[$i][37]&"</VirtualSize>")                                 FileWriteLine($file, "          <WindowsVersion>"&$Items[$i][38]&"</WindowsVersion>")                                   FileWriteLine($file, "          <WorkingSetSize>"&$Items[$i][39]&"</WorkingSetSize>")                                   FileWriteLine($file, "          <WriteOperationCount>"&$Items[$i][40]&"</WriteOperationCount>")                         FileWriteLine($file, "          <WriteTransferCount>"&$Items[$i][41]&"</WriteTransferCount>")               FileWriteLine($file, "      </Process>")        Next                FileWriteLine($file, "  </Processes>")EndFuncFunc _XML_GetProcesses(ByRef $Processes)       SplashTextOn("Gathering Windows Information", "Importing Processes from XML"&@LF, 300, 100, -1, -1, 32, "", 12) Dim  $Processes[1][42], $i = 1  If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/OperatingSystem/Processes/Process")      If $i_Nodes > 0 Then                        for $i=1 to $i_Nodes Step 1                                 ReDim $Processes[UBound($Processes) + 1][42]                Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/OperatingSystem/Processes/*["&$i&"]",$aAttrName,$aAttrValue )                                                ControlSetText ("Gathering Windows Information", "", "Static1","Importing Process:"&@LF&$aAttrValue[0])             $Processes[$i][0] = $aAttrValue[0]                                          $Processes[$i][1]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/CommandLine"))               $Processes[$i][2]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/CreationClassName"))             $Processes[$i][3]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/CreationDate"))              $Processes[$i][4]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/Description"))               $Processes[$i][5]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/CSCreationClassName"))               $Processes[$i][6]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/CSName"))                $Processes[$i][7]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ExecutablePath"))                $Processes[$i][8]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ExecutionState"))                $Processes[$i][9]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/Handle"))                $Processes[$i][10] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/HandleCount"))               $Processes[$i][11] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/KernelModeTime"))                $Processes[$i][12] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/MaximumWorkingSetSize"))             $Processes[$i][13] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/MinimumWorkingSetSize"))             $Processes[$i][14] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/OSCreationClassName"))               $Processes[$i][15] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/OSName"))                $Processes[$i][16] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/OtherOperationCount"))               $Processes[$i][17] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/OtherTransferCount"))                $Processes[$i][18] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/PageFaults"))                $Processes[$i][19] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/PageFileUsage"))             $Processes[$i][20] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ParentProcessId"))               $Processes[$i][21] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/PeakPageFileUsage"))             $Processes[$i][22] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/PeakVirtualSize"))               $Processes[$i][23] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/PeakWorkingSetSize"))                $Processes[$i][24] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/Priority"))              $Processes[$i][25] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/PrivatePageCount"))              $Processes[$i][26] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ProcessId"))             $Processes[$i][27] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/QuotaNonPagedPoolUsage"))                $Processes[$i][28] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/QuotaPagedPoolUsage"))               $Processes[$i][29] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/QuotaPeakNonPagedPoolUsage"))                $Processes[$i][30] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/QuotaPeakPagedPoolUsage"))               $Processes[$i][31] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ReadOperationCount"))                $Processes[$i][32] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ReadTransferCount"))             $Processes[$i][33] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/SessionId"))             $Processes[$i][34] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/Status"))                $Processes[$i][35] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/ThreadCount"))               $Processes[$i][36] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/UserModeTime"))              $Processes[$i][37] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/VirtualSize"))               $Processes[$i][38] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/WindowsVersion"))                $Processes[$i][39] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/WorkingSetSize"))                $Processes[$i][40] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/WriteOperationCount"))               $Processes[$i][41] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Processes/Process["&$i&"]/WriteTransferCount"))            Next                            $Processes[0][0] = UBound($Processes) - 1           If $Processes[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf   EndIfEndFuncFunc DisplayProcesses() SplashTextOn("Gathering Windows Information", "retrieving Processes"&@LF, 300, 100, -1, -1, 32, "", 12) Dim $Processes  If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetProcesses($Processes)   Else        _XML_GetProcesses($Processes)   EndIf   ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $Processes[0][0] Step 1       $Item = GUICtrlCreateTreeViewitem($Processes[$i][0], $Panel)        GUICtrlCreateTreeViewitem("Command Line: " &$Processes[$i][1], $Item)       GUICtrlCreateTreeViewitem("Creation Class Name: " &$Processes[$i][2], $Item)        GUICtrlCreateTreeViewitem("Creation Date: " &$Processes[$i][3], $Item)      GUICtrlCreateTreeViewitem("Description: " &$Processes[$i][4], $Item)        GUICtrlCreateTreeViewitem("CS Creation Class Name: " &$Processes[$i][5], $Item)     GUICtrlCreateTreeViewitem("CS Name: " &$Processes[$i][6], $Item)        GUICtrlCreateTreeViewitem("Executable Path: " &$Processes[$i][7], $Item)        GUICtrlCreateTreeViewitem("Execution State: " &$Processes[$i][8], $Item)        GUICtrlCreateTreeViewitem("Handle: " &$Processes[$i][9], $Item)     GUICtrlCreateTreeViewitem("Handle Count: " &$Processes[$i][10], $Item)      GUICtrlCreateTreeViewitem("Kernel Mode Time: " &$Processes[$i][11], $Item)      GUICtrlCreateTreeViewitem("Maximum Working Set Size: " &$Processes[$i][12], $Item)      GUICtrlCreateTreeViewitem("Minimum Working Set Size: " & $Processes[$i][13], $Item)     GUICtrlCreateTreeViewitem("OS Creation Class Name: " &$Processes[$i][14], $Item)        GUICtrlCreateTreeViewitem("OS Name: " &$Processes[$i][15], $Item)       GUICtrlCreateTreeViewitem("Other Operation Count: " &$Processes[$i][16], $Item)     GUICtrlCreateTreeViewitem("Other Transfer Count: " &$Processes[$i][17], $Item)      GUICtrlCreateTreeViewitem("Page Faults: " &$Processes[$i][18], $Item)       GUICtrlCreateTreeViewitem("Page File Usage: " &$Processes[$i][19], $Item)       GUICtrlCreateTreeViewitem("Parent Process ID: " &$Processes[$i][20], $Item)     GUICtrlCreateTreeViewitem("Peak Page File Usage: " &$Processes[$i][21], $Item)      GUICtrlCreateTreeViewitem("Peak Virtual Size: " &$Processes[$i][22], $Item)             GUICtrlCreateTreeViewitem("Peak Working Set Size: " &$Processes[$i][23], $Item)             GUICtrlCreateTreeViewitem("Priority: " &$Processes[$i][24], $Item)              GUICtrlCreateTreeViewitem("Private Page Count: " &$Processes[$i][25], $Item)                GUICtrlCreateTreeViewitem("Process ID: " &$Processes[$i][26], $Item)                        GUICtrlCreateTreeViewitem("Quota Non Paged Pool Usage: " &$Processes[$i][27], $Item)                        GUICtrlCreateTreeViewitem("Quota Paged Pool Usage: " &$Processes[$i][28], $Item)                        GUICtrlCreateTreeViewitem("Quota Peak Non Paged Pool Usage: " &$Processes[$i][29], $Item)                       GUICtrlCreateTreeViewitem("Quota Peak Paged Pool Usage: " &$Processes[$i][30], $Item)                           GUICtrlCreateTreeViewitem("Read Operation Count: " &$Processes[$i][31], $Item)                          GUICtrlCreateTreeViewitem("Read Transfer Count: " &$Processes[$i][32], $Item)                           GUICtrlCreateTreeViewitem("Session ID: " &$Processes[$i][33], $Item)                            GUICtrlCreateTreeViewitem("Status: " &$Processes[$i][34], $Item)                                GUICtrlCreateTreeViewitem("Thread Count: " &$Processes[$i][35], $Item)                              GUICtrlCreateTreeViewitem("User Mode Time: " &$Processes[$i][36], $Item)                                GUICtrlCreateTreeViewitem("Virtual Size: " &$Processes[$i][37], $Item)                                  GUICtrlCreateTreeViewitem("Windows Version: " &$Processes[$i][38], $Item)                                   GUICtrlCreateTreeViewitem("Working Set Size: " &$Processes[$i][39], $Item)                                  GUICtrlCreateTreeViewitem("Write Operation Count: " &$Processes[$i][40], $Item)                         GUICtrlCreateTreeViewitem("Write Transfer Count: " &$Processes[$i][41], $Item)                          Next    Sleep(1000) SplashOff()     GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)  EndFunc#endregion#region Dependant ServicesFunc _XML_ExtractDependantServices($file)        ControlSetText ("Extracting to XML", "", "Static1", "Dependant Services")   FileWriteLine($file, "  <DependantServices>")           Dim $aDependantServiceInfo  _ComputerGetDependantServices($aDependantServiceInfo)       For $i = 1 To $aDependantServiceInfo[0][0] Step 1           FileWriteLine($file, "      <DependantService>")        FileWriteLine($file, "          <Antecedent>"&WriteProperXML($aDependantServiceInfo[$i][0])&"</Antecedent>")        FileWriteLine($file, "          <Dependant>"&WriteProperXML($aDependantServiceInfo[$i][1])&"</Dependant>")      FileWriteLine($file, "          <TypeOfDependancy>"&WriteProperXML($aDependantServiceInfo[$i][2])&"</TypeOfDependancy>")        FileWriteLine($file, "      </DependantService>")   Next                FileWriteLine($file, "  </DependantServices>")EndFuncFunc _XML_GetDependantServices(ByRef $DependantServices)   SplashTextOn("Gathering Windows Information", "Importing Dependant Services from XML"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $i = 1, $DependantServices[1][3]    If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/OperatingSystem/DependantServices/DependantService")     If $i_Nodes > 0 Then                        for $i=1 to $i_Nodes Step 1                 ReDim $DependantServices[UBound($DependantServices) + 1][3]             $value = _RetFirst(_XMLGetValue ("Report/OperatingSystem/DependantServices/DependantService["&$i&"]/Antecedent"))               $ar=StringSplit($value,"=")             $antecedant = StringReplace($ar[2],'"'," ")             ControlSetText ("Gathering Windows Information", "", "Static1","Importing Dependant Services:"&@LF&$antecedant)             $DependantServices[$i][0] = $value              $DependantServices[$i][1] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/DependantServices/DependantService["&$i&"]/Dependant"))             $DependantServices[$i][2] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/DependantServices/DependantService["&$i&"]/TypeOfDependancy "))         Next                            $DependantServices[0][0] = UBound($DependantServices) - 1           If $DependantServices[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf   EndIfEndFuncFunc DisplayDependantServices() SplashTextOn("Gathering Windows Information", "retrieving Dependant Services"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $DependantService       If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetDependantServices($DependantService)    Else        _XML_GetDependantServices($DependantService)    EndIf   ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $DependantService[0][0] Step 1                            $Item = GUICtrlCreateTreeViewitem("Antecedent :" &$DependantService[$i][0], $Panel)                         GUICtrlCreateTreeViewitem("Dependent: " & $DependantService[$i][1], $Item)      GUICtrlCreateTreeViewitem("TypeOfDependency: " & $DependantService[$i][2], $Item)   Next                    Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)EndFunc#endregion#region ServicesFunc _XML_ExtractServices($file) ControlSetText ("Extracting to XML", "", "Static1", "Services") Dim $Items  _ComputerGetServices($Items)        FileWriteLine($file, "  <Services>")                For $i = 1 To $Items[0][0] Step 1                   FileWriteLine($file, "      <Service Name="""&WriteProperXML($Items[$i][0])&""">")      FileWriteLine($file, "          <AcceptPause>"&$Items[$i][1]&"</AcceptPause>")      FileWriteLine($file, "          <AcceptStop>"&$Items[$i][2]&"</AcceptStop>")        FileWriteLine($file, "          <CheckPoint>"&$Items[$i][3]&"</CheckPoint>")        FileWriteLine($file, "          <Description>"&$Items[$i][4]&"</Description>")      FileWriteLine($file, "          <CreationClassName>"&WriteProperXML($Items[$i][5])&"</CreationClassName>")      FileWriteLine($file, "          <DesktopInteract>"&$Items[$i][6]&"</DesktopInteract>")      FileWriteLine($file, "          <DisplayName>"&WriteProperXML($Items[$i][7])&"</DisplayName>")      FileWriteLine($file, "          <ErrorControl>"&$Items[$i][8]&"</ErrorControl>")        FileWriteLine($file, "          <ExitCode>"&$Items[$i][9]&"</ExitCode>")        FileWriteLine($file, "          <PathName>"&WriteProperXML($Items[$i][10])&"</PathName>")       FileWriteLine($file, "          <ProcessId>"&$Items[$i][11]&"</ProcessId>")     FileWriteLine($file, "          <ServiceSpecificExitCode>"&$Items[$i][12]&"</ServiceSpecificExitCode>")     FileWriteLine($file, "          <ServiceType>"&$Items[$i][13]&"</ServiceType>")     FileWriteLine($file, "          <Started>"&$Items[$i][14]&"</Started>")     FileWriteLine($file, "          <StartMode>"&$Items[$i][15]&"</StartMode>")     FileWriteLine($file, "          <StartName>"&WriteProperXML($Items[$i][16])&"</StartName>")     FileWriteLine($file, "          <State>"&$Items[$i][17]&"</State>")     FileWriteLine($file, "          <SystemCreationClassName>"&WriteProperXML($Items[$i][18])&"</SystemCreationClassName>")     FileWriteLine($file, "          <SystemName>"&WriteProperXML($Items[$i][19])&"</SystemName>")       FileWriteLine($file, "          <TagId>"&$Items[$i][20]&"</TagId>")     FileWriteLine($file, "          <WaitHint>"&$Items[$i][21]&"</WaitHint>")           FileWriteLine($file, "      </Service>")        Next                FileWriteLine($file, "  </Services>")EndFuncFunc _XML_GetServices(ByRef $aServicesInfo) SplashTextOn("Gathering Windows Information", "Importing Services from XML"&@LF, 300, 100, -1, -1, 32, "", 12)  Dim $aServicesInfo[1][23], $i = 1   If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/OperatingSystem/Services/Service")       If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $aServicesInfo[UBound($aServicesInfo) + 1][23]                Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/OperatingSystem/Services/*["&$i&"]",$aAttrName,$aAttrValue )                                             ControlSetText ("Gathering Windows Information", "", "Static1","Importing Service:"&@LF&$aAttrValue[0])             $aServicesInfo[$i][0]  = $aAttrValue[0]             $aServicesInfo[$i][1]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/AcceptPause"))                $aServicesInfo[$i][2]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/AcceptStop"))             $aServicesInfo[$i][3]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/CheckPoint"))             $aServicesInfo[$i][4]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/Description"))                $aServicesInfo[$i][5]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/CreationClassName"))              $aServicesInfo[$i][6]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/DesktopInteract"))                $aServicesInfo[$i][7]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/DisplayName"))                $aServicesInfo[$i][8]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/ErrorControl"))               $aServicesInfo[$i][9]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/ExitCode"))               $aServicesInfo[$i][10] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/PathName"))               $aServicesInfo[$i][11] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/ProcessId"))              $aServicesInfo[$i][12] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/ServiceSpecificExitCode"))                $aServicesInfo[$i][13] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/ServiceType"))                $aServicesInfo[$i][14] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/Started"))                $aServicesInfo[$i][15] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/StartMode"))              $aServicesInfo[$i][16] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/StartName"))              $aServicesInfo[$i][17] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/State"))              $aServicesInfo[$i][18] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/Status"))             $aServicesInfo[$i][19] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/SystemCreationClassName"))                $aServicesInfo[$i][20] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/SystemName"))             $aServicesInfo[$i][21] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/TagId"))              $aServicesInfo[$i][22] = _RetFirst(_XMLGetValue ("Report/OperatingSystem/Services/Service["&$i&"]/WaitHint"))           Next            $aServicesInfo[0][0] = UBound($aServicesInfo) - 1           If $aServicesInfo[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf   EndIfEndFuncFunc DisplayServices()  SplashTextOn("Gathering Windows Information", "retrieving Services", 300, 100, -1, -1, 32, "", 12)  Dim $Services       If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetServices($Services) Else        _XML_GetServices($Services) EndIf               ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)  Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $Services[0][0] Step 1            $Item = GUICtrlCreateTreeViewitem($Services[$i][0], $Panel)         GUICtrlCreateTreeViewitem("Accept Pause: " &$Services[$i][1], $Item)            GUICtrlCreateTreeViewitem("Accept Stop: " &$Services[$i][2], $Item)         GUICtrlCreateTreeViewitem("Check Point: " &$Services[$i][3], $Item)         GUICtrlCreateTreeViewitem("Description: " &$Services[$i][4], $Item)         GUICtrlCreateTreeViewitem("Creation Classname: " &$Services[$i][5], $Item)          GUICtrlCreateTreeViewitem("Desktop Interact: " &$Services[$i][6], $Item)            GUICtrlCreateTreeViewitem("Display Name: " &$Services[$i][7], $Item)            GUICtrlCreateTreeViewitem("Error Control: " &$Services[$i][8], $Item)           GUICtrlCreateTreeViewitem("Exit Code: " &$Services[$i][9], $Item)           GUICtrlCreateTreeViewitem("Path Name: " &$Services[$i][10], $Item)          GUICtrlCreateTreeViewitem("Process ID: " &$Services[$i][11], $Item)         GUICtrlCreateTreeViewitem("Service Specific Exit Code: " &$Services[$i][12], $Item)         GUICtrlCreateTreeViewitem("Service Type: " &$Services[$i][13], $Item)           GUICtrlCreateTreeViewitem("Started: " &$Services[$i][14], $Item)            GUICtrlCreateTreeViewitem("Start Mode: " &$Services[$i][15], $Item)         GUICtrlCreateTreeViewitem("Start Name: " &$Services[$i][16], $Item)         GUICtrlCreateTreeViewitem("State: " &$Services[$i][17], $Item)          GUICtrlCreateTreeViewitem("Status: " &$Services[$i][18], $Item)         GUICtrlCreateTreeViewitem("System Creation Classname: " &$Services[$i][19], $Item)          GUICtrlCreateTreeViewitem("System Name: " &$Services[$i][20], $Item)            GUICtrlCreateTreeViewitem("Tag ID: " &$Services[$i][21], $Item)         GUICtrlCreateTreeViewitem("Wait Hint: " &$Services[$i][22], $Item)                          Next                Sleep(1000) SplashOff()     GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)EndFunc#endregion#region System DriversFunc _XML_ExtractSystemDrivers($file)      ControlSetText ("Extracting to XML", "", "Static1", "System Drivers")   FileWriteLine($file, "  <SystemDrivers>")           Dim $SystemDrivers  _GetSystemDrivers($SystemDrivers)   For $i = 1 To $SystemDrivers[0][0] Step 1           FileWriteLine($file, "      <SystemDriver Name="""&WriteProperXML($SystemDrivers[$i][0])&""">")     FileWriteLine($file, "          <PathName>"&WriteProperXML($SystemDrivers[$i][1])&"</PathName>")        FileWriteLine($file, "          <ServiceSpecificExitCode>"&$SystemDrivers[$i][2]&"</ServiceSpecificExitCode>")      FileWriteLine($file, "          <ServiceType>"&$SystemDrivers[$i][3]&"</ServiceType>")      FileWriteLine($file, "          <Started>"&$SystemDrivers[$i][4]&"</Started>")      FileWriteLine($file, "          <StartMode>"&$SystemDrivers[$i][5]&"</StartMode>")      FileWriteLine($file, "          <StartName>"&WriteProperXML($SystemDrivers[$i][6])&"</StartName>")      FileWriteLine($file, "          <State>"&$SystemDrivers[$i][7]&"</State>")      FileWriteLine($file, "          <Status>"&$SystemDrivers[$i][8]&"</Status>")                                FileWriteLine($file, "          <SystemCreationClassName>"&WriteProperXML($SystemDrivers[$i][9])&"</SystemCreationClassName>")      FileWriteLine($file, "          <SystemName>"&WriteProperXML($SystemDrivers[$i][10])&"</SystemName>")       FileWriteLine($file, "          <TagId>"&$SystemDrivers[$i][11]&"</TagId>")     FileWriteLine($file, "          <AcceptPause>"&$SystemDrivers[$i][12]&"</AcceptPause>")     FileWriteLine($file, "          <AcceptStop>"&$SystemDrivers[$i][13]&"</AcceptStop>")       FileWriteLine($file, "          <Caption>"&$SystemDrivers[$i][14]&"</Caption>")     FileWriteLine($file, "          <CreationClassName>"&$SystemDrivers[$i][15]&"</CreationClassName>")     FileWriteLine($file, "          <Description>"&$SystemDrivers[$i][16]&"</Description>")     FileWriteLine($file, "          <DesktopInteract>"&$SystemDrivers[$i][17]&"</DesktopInteract>")     FileWriteLine($file, "          <DisplayName>"&WriteProperXML($SystemDrivers[$i][18])&"</DisplayName>")     FileWriteLine($file, "          <ErrorControl>"&$SystemDrivers[$i][19]&"</ErrorControl>")       FileWriteLine($file, "          <ExitCode>"&$SystemDrivers[$i][20]&"</ExitCode>")       FileWriteLine($file, "          <InstallDate>"&$SystemDrivers[$i][21]&"</InstallDate>")     FileWriteLine($file, "      </SystemDriver>")   Next                FileWriteLine($file, "  </SystemDrivers>")  EndFuncFunc _XML_GetSystemDrivers(ByRef $SystemDrivers) SplashTextOn("Gathering Windows Information", "Importing System Drivers from XML"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $SystemDrivers[1][22], $i = 1   If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/OperatingSystem/SystemDrivers/SystemDriver")     If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $SystemDrivers[UBound($SystemDrivers) + 1][22]                Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/OperatingSystem/SystemDrivers/*["&$i&"]",$aAttrName,$aAttrValue )                                                ControlSetText ("Gathering Windows Information", "", "Static1","Importing System Driver:"&@LF&$aAttrValue[0])               $SystemDrivers[$i][0]  = $aAttrValue[0]             $SystemDrivers[$i][1]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/PathName"))             $SystemDrivers[$i][2]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/ServiceSpecificExitCode"))              $SystemDrivers[$i][3]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/ServiceType"))              $SystemDrivers[$i][4]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/Started"))              $SystemDrivers[$i][5]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/StartMode"))                $SystemDrivers[$i][6]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/StartName"))                $SystemDrivers[$i][7]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/State"))                $SystemDrivers[$i][8]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/Status"))                           $SystemDrivers[$i][9]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/SystemCreationClassName"))              $SystemDrivers[$i][10]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/SystemName"))              $SystemDrivers[$i][11]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/TagId"))               $SystemDrivers[$i][12]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/AcceptPause"))             $SystemDrivers[$i][13]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/AcceptStop"))              $SystemDrivers[$i][14]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/Caption"))             $SystemDrivers[$i][15]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/CreationClassName"))               $SystemDrivers[$i][16]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/Description"))                         $SystemDrivers[$i][17]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/DesktopInteract"))             $SystemDrivers[$i][18]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/DisplayName"))             $SystemDrivers[$i][19]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/ErrorControl"))                $SystemDrivers[$i][20]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/ExitCode"))                $SystemDrivers[$i][21]  = _RetFirst(_XMLGetValue ("Report/OperatingSystem/SystemDrivers/SystemDriver["&$i&"]/InstallDate"))         Next                            $SystemDrivers[0][0] = UBound($SystemDrivers) - 1           If $SystemDrivers[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf   EndIf       EndFuncFunc _GetSystemDrivers(ByRef $SystemDrivers) Local $colItems, $objWMIService, $objItem   Dim $SystemDrivers[1][22], $i = 1       $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")   $colItems = $objWMIService.ExecQuery("Select * from Win32_SystemDriver", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)  If IsObj($colItems) Then        For $objItem In $colItems           ReDim $SystemDrivers[UBound($SystemDrivers) + 1][22]            $SystemDrivers[$i][0]  = $objItem.Name          $SystemDrivers[$i][1]  = $objItem.PathName          $SystemDrivers[$i][2]  = $objItem.ServiceSpecificExitCode           $SystemDrivers[$i][3]  = $objItem.ServiceType           $SystemDrivers[$i][4]  = $objItem.Started           $SystemDrivers[$i][5]  = $objItem.StartMode         $SystemDrivers[$i][6]  = $objItem.StartName         $SystemDrivers[$i][7]  = $objItem.State         $SystemDrivers[$i][8]  = $objItem.Status                        $SystemDrivers[$i][9]  = $objItem.SystemCreationClassName           $SystemDrivers[$i][10]  = $objItem.SystemName           $SystemDrivers[$i][11]  = $objItem.TagId            $SystemDrivers[$i][12]  = $objItem.AcceptPause          $SystemDrivers[$i][13]  = $objItem.AcceptStop           $SystemDrivers[$i][14]  = $objItem.Caption          $SystemDrivers[$i][15]  = $objItem.CreationClassName            $SystemDrivers[$i][16]  = $objItem.Description                      $SystemDrivers[$i][17]  = $objItem.DesktopInteract          $SystemDrivers[$i][18]  = $objItem.DisplayName          $SystemDrivers[$i][19]  = $objItem.ErrorControl         $SystemDrivers[$i][20]  = $objItem.ExitCode         $SystemDrivers[$i][21]  = $objItem.InstallDate          $i += 1     Next        $SystemDrivers[0][0] = UBound($SystemDrivers) - 1       If $SystemDrivers[0][0] < 1 Then            SetError(1, 1, 0)       EndIf   Else        SetError(1, 2, 0)   EndIfEndFuncFunc DisplaySystemDrivers() SplashTextOn("Gathering Windows Information", "retrieving System Drivers"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $SystemDrivers  If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _GetSystemDrivers($SystemDrivers)   Else        _XML_GetSystemDrivers($SystemDrivers)   EndIf               ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $SystemDrivers[0][0] Step 1       If ($SystemDrivers[$i][0] <> "") Then                                       $Item = GUICtrlCreateTreeViewitem($SystemDrivers[$i][0], $Panel)            GUICtrlCreateTreeViewitem("PathName: " &$SystemDrivers[$i][1], $Item)           GUICtrlCreateTreeViewitem("ServiceSpecificExitCode: " &$SystemDrivers[$i][2], $Item)            GUICtrlCreateTreeViewitem("ServiceType: " &$SystemDrivers[$i][3], $Item)            GUICtrlCreateTreeViewitem("Started: " &$SystemDrivers[$i][4], $Item)            GUICtrlCreateTreeViewitem("StartMode: " &$SystemDrivers[$i][5], $Item)          GUICtrlCreateTreeViewitem("StartName: " &$SystemDrivers[$i][6], $Item)          GUICtrlCreateTreeViewitem("State: " &$SystemDrivers[$i][7], $Item)          GUICtrlCreateTreeViewitem("Status: " &$SystemDrivers[$i][8], $Item)                                 GUICtrlCreateTreeViewitem("SystemCreationClassName: " &$SystemDrivers[$i][9], $Item)            GUICtrlCreateTreeViewitem("SystemName: " &$SystemDrivers[$i][10], $Item)            GUICtrlCreateTreeViewitem("TagId: " &$SystemDrivers[$i][11], $Item)         GUICtrlCreateTreeViewitem("AcceptPause: " &$SystemDrivers[$i][12], $Item)           GUICtrlCreateTreeViewitem("AcceptStop: " &$SystemDrivers[$i][13], $Item)            GUICtrlCreateTreeViewitem("Caption: " &$SystemDrivers[$i][14], $Item)           GUICtrlCreateTreeViewitem("CreationClassName: " &$SystemDrivers[$i][15], $Item)         GUICtrlCreateTreeViewitem("Description: " &$SystemDrivers[$i][16], $Item)           GUICtrlCreateTreeViewitem("DesktopInteract: " &$SystemDrivers[$i][17], $Item)           GUICtrlCreateTreeViewitem("DisplayName: " &$SystemDrivers[$i][18], $Item)           GUICtrlCreateTreeViewitem("ErrorControl: " &$SystemDrivers[$i][19], $Item)          GUICtrlCreateTreeViewitem("ExitCode: " &$SystemDrivers[$i][20], $Item)          GUICtrlCreateTreeViewitem("InstallDate: " &$SystemDrivers[$i][21], $Item)       EndIf   Next    Sleep(1000) SplashOff()                         GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)  EndFunc#endregion#endregion#region Software#region Installed SoftwareFunc _XML_ExtractInstalledSoftware($file)  ControlSetText ("Extracting to XML", "", "Static1", "Installed Software"&@LF)   Dim $Items  _GetInstalledSoftware($Items) ;Defaults to "FIXED"  FileWriteLine($file, "  <InstalledSoftware>")           For $i = 1 To $Items[0][0] Step 1           FileWriteLine($file, "      <Software Name="""&WriteProperXML($Items[$i][0])&""">")     FileWriteLine($file, "          <Description>"&WriteProperXML($Items[$i][1])&"</Description>")      FileWriteLine($file, "          <InstallDate>"&$Items[$i][3]&"</InstallDate>")      FileWriteLine($file, "          <InstallLocation>"&$Items[$i][5]&"</InstallLocation>")      FileWriteLine($file, "          <Vendor>"&WriteProperXML($Items[$i][7])&"</Vendor>")        FileWriteLine($file, "          <Version>"&$Items[$i][8]&"</Version>")      FileWriteLine($file, "      </Software>")   Next                FileWriteLine($file, "  </InstalledSoftware>")EndFuncFunc _GetInstalledSoftware(ByRef $InstalledSoftware)   Local $colItems, $objWMIService, $objItem   Dim $InstalledSoftware[1][9], $i = 1        $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")   $colItems = $objWMIService.ExecQuery("Select * from Win32_Product", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)       If IsObj($colItems) Then        For $objItem In $colItems           ReDim $InstalledSoftware[UBound($InstalledSoftware) + 1][9]         $InstalledSoftware[$i][0]  = $objItem.Caption           $InstalledSoftware[$i][1]  = $objItem.Description           $InstalledSoftware[$i][2]  = $objItem.IdentifyingNumber         $InstalledSoftware[$i][3]  = $objItem.InstallDate           $InstalledSoftware[$i][4]  = $objItem.InstallLocation           $InstalledSoftware[$i][5]  = $objItem.Name          $InstalledSoftware[$i][6]  = $objItem.PackageCache          $InstalledSoftware[$i][7]  = $objItem.Vendor            $InstalledSoftware[$i][8]  = $objItem.Version           $i += 1     Next        $InstalledSoftware[0][0] = UBound($InstalledSoftware) - 1       If $InstalledSoftware[0][0] < 1 Then            SetError(1, 1, 0)       EndIf   Else        SetError(1, 2, 0)   EndIfEndFuncFunc _XML_GetInstalledSoftware(ByRef $InstalledPrograms)    SplashTextOn("Gathering Windows Information", "Importing Installed Software from XML"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $InstalledPrograms[1][9], $i = 1    If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Software/InstalledSoftware/Software")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $InstalledPrograms[UBound($InstalledPrograms) + 1][9]             Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Software/InstalledSoftware/*["&$i&"]",$aAttrName,$aAttrValue )                                               ControlSetText ("Gathering Windows Information", "", "Static1","Importing Installed Software:"&@LF&$aAttrValue[0])              $InstalledPrograms[$i][0]  = $aAttrValue[0]             $InstalledPrograms[$i][1]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/Description"));                $InstalledPrograms[$i][2]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/IdentifyingNumber"));              $InstalledPrograms[$i][3]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/InstallDate"));                $InstalledPrograms[$i][4]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/InstallLocation"));                $InstalledPrograms[$i][5]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/Name"));               $InstalledPrograms[$i][6]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/PackageCache"));               $InstalledPrograms[$i][7]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/Vendor"));             $InstalledPrograms[$i][8]  = _RetFirst(_XMLGetValue ("Report/Software/InstalledSoftware/Software["&$i&"]/Version"));                                            Next                            $InstalledPrograms[0][0] = UBound($InstalledPrograms) - 1           If $InstalledPrograms[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf   EndIf           EndFuncFunc DisplayInstalledSoftware()  SplashTextOn("Gathering Windows Information", "retrieving Installed Programs"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $Software   If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _GetInstalledSoftware($Software)    Else        _XML_GetInstalledSoftware($Software)    EndIf           ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $Software[0][0] Step 1        If ($Software[$i][0] <> "") Then                                    $Item = GUICtrlCreateTreeViewitem($Software[$i][0], $Panel)         GUICtrlCreateTreeViewitem("Description: " &$Software[$i][1], $Item)         GUICtrlCreateTreeViewitem("IdentifyingNumber: " &$Software[$i][2], $Item)           GUICtrlCreateTreeViewitem("InstallDate: " &$Software[$i][3], $Item)         GUICtrlCreateTreeViewitem("InstallLocation: " &$Software[$i][4], $Item)         GUICtrlCreateTreeViewitem("Name: " &$Software[$i][5], $Item)            GUICtrlCreateTreeViewitem("PackageCache: " &$Software[$i][6], $Item)            GUICtrlCreateTreeViewitem("Vendor: " &$Software[$i][7], $Item)          GUICtrlCreateTreeViewitem("Version: " &$Software[$i][8], $Item)     EndIf   Next    Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)      EndFunc#endregion#region Shared FoldersFunc _XML_ExtractShares($file)   ControlSetText ("Extracting to XML", "", "Static1", "Shares")   FileWriteLine($file, "  <Shares>")          Dim $Shares _ComputerGetShares($Shares) For $i = 1 To $Shares[0][0] Step 1              FileWriteLine($file, "      <Share Name="""&WriteProperXML($Shares[$i][0])&""">")       FileWriteLine($file, "          <AccessMask>"&WriteProperXML($Shares[$i][1])&"</AccessMask>")       FileWriteLine($file, "          <AllowMaximum>"&WriteProperXML($Shares[$i][2])&"</AllowMaximum>")       FileWriteLine($file, "          <MaximumAllowed>"&WriteProperXML($Shares[$i][3])&"</MaximumAllowed>")           FileWriteLine($file, "          <Description>"&WriteProperXML($Shares[$i][3])&"</Description>")         FileWriteLine($file, "          <Path>"&WriteProperXML($Shares[$i][3])&"</Path>")           FileWriteLine($file, "          <Status>"&WriteProperXML($Shares[$i][3])&"</Status>")           FileWriteLine($file, "          <Type>"&WriteProperXML($Shares[$i][3])&"</Type>")           FileWriteLine($file, "      </Share>")          Next            FileWriteLine($file, "  </Shares>") EndFuncFunc _XML_GetShares(ByRef $Shares)   SplashTextOn("Gathering Windows Information", "Importing Shares from XML"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $Shares[1][8], $i = 1   If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Software/Shares/Share")      If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $Shares[UBound($Shares) + 1][8]               Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Software/Shares/*["&$i&"]",$aAttrName,$aAttrValue )                                              ControlSetText ("Gathering Windows Information", "", "Static1","Importing Share:"&@LF&$aAttrValue[0])               $Shares[$i][0]  = $aAttrValue[0]                $Shares[$i][1]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/AccessMask"))               $Shares[$i][2]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/AllowMaximum"))             $Shares[$i][3]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/MaximumAllowed"))               $Shares[$i][4]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/Description"))              $Shares[$i][5]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/Path"))             $Shares[$i][6]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/Status"))               $Shares[$i][7]  = _RetFirst(_XMLGetValue ("Report/Software/Shares/Share["&$i&"]/Type"))         Next                            $Shares[0][0] = UBound($Shares) - 1         If $Shares[0][0] < 1 Then               SetError(1, 1, 0)           EndIf       EndIf   EndIf       EndFuncFunc DisplayShares() SplashTextOn("Gathering Windows Information", "retrieving Shared Drives", 300, 100, -1, -1, 32, "", 12) Dim $Shares If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetShares($Shares) Else                _XML_GetShares($Shares) EndIf       ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $Shares[0][0] Step 1                              $Item = GUICtrlCreateTreeViewitem($Shares[$i][0], $Panel)       GUICtrlCreateTreeViewitem("Access Mask: " &$Shares[$i][1], $Item)       GUICtrlCreateTreeViewitem("Allow Maximum: " &$Shares[$i][2], $Item)     GUICtrlCreateTreeViewitem("Maximum Allowed: " &$Shares[$i][3], $Item)       GUICtrlCreateTreeViewitem("Description: " &$Shares[$i][4], $Item)       GUICtrlCreateTreeViewitem("Path: " &$Shares[$i][5], $Item)      GUICtrlCreateTreeViewitem("Status: " &$Shares[$i][6], $Item)        GUICtrlCreateTreeViewitem("Type: " &$Shares[$i][7], $Item)  Next    Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)  EndFunc#endregion#region Startup InformationFunc _XML_ExtractStartup($file) ControlSetText ("Extracting to XML", "", "Static1", "Startup")  FileWriteLine($file, "  <StartupInformation>")          Dim $StartupInfo    _ComputerGetStartup($StartupInfo)       For $i = 1 To $StartupInfo[0][0] Step 1         FileWriteLine($file, "      <Startup Name="""&WriteProperXML($StartupInfo[$i][0])&""">")        FileWriteLine($file, "          <User>"&$StartupInfo[$i][1]&"</User>")      FileWriteLine($file, "          <Location>"&WriteProperXML($StartupInfo[$i][2])&"</Location>")      FileWriteLine($file, "          <Command>"&WriteProperXML($StartupInfo[$i][3])&"</Command>")        FileWriteLine($file, "          <Description>"&WriteProperXML($StartupInfo[$i][4])&"</Description>")        FileWriteLine($file, "          <SettingID>"&$StartupInfo[$i][5]&"</SettingID>")        FileWriteLine($file, "      </Startup>")    Next                FileWriteLine($file, "  </StartupInformation>")EndFuncFunc _XML_GetStartup(ByRef $Startup)  SplashTextOn("Gathering Windows Information", "Importing startup information"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $Startup[1][6], $i = 1  If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Software/StartupInformation/Startup")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $Startup[UBound($Startup) + 1][6]             Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Software/StartupInformation/*["&$i&"]",$aAttrName,$aAttrValue )                                              ControlSetText ("Gathering Windows Information", "", "Static1","Importing Startup:"&@LF&$aAttrValue[0])             $Startup[$i][0]  = $aAttrValue[0]                               $Startup[$i][1]  = _RetFirst(_XMLGetValue ("Report/Software/StartupInformation/Startup["&$i&"]/User"))              $Startup[$i][2]  = _RetFirst(_XMLGetValue ("Report/Software/StartupInformation/Startup["&$i&"]/Location"))              $Startup[$i][3]  = _RetFirst(_XMLGetValue ("Report/Software/StartupInformation/Startup["&$i&"]/Command"))               $Startup[$i][4]  = _RetFirst(_XMLGetValue ("Report/Software/StartupInformation/Startup["&$i&"]/Description"))               $Startup[$i][5]  = _RetFirst(_XMLGetValue ("Report/Software/StartupInformation/Startup["&$i&"]/SettingID"))         Next                            $Startup[0][0] = UBound($Startup) - 1           If $Startup[0][0] < 1 Then              SetError(1, 1, 0)           EndIf       EndIf   EndIf           EndFuncFunc DisplayStartup()    SplashTextOn("Gathering Windows Information", "retrieving Startup Items", 300, 100, -1, -1, 32, "", 12) Dim $Startup        If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetStartup($Startup)   Else        _XML_GetStartup($Startup)   EndIf       ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $Startup[0][0] Step 1                     $Item = GUICtrlCreateTreeViewitem($Startup[$i][0], $Panel)  GUICtrlCreateTreeViewitem("User: " &$Startup[$i][1], $Item) GUICtrlCreateTreeViewitem("Location: " &$Startup[$i][2], $Item) GUICtrlCreateTreeViewitem("Command: " &$Startup[$i][3], $Item)  GUICtrlCreateTreeViewitem("Description: " &$Startup[$i][4], $Item)  GUICtrlCreateTreeViewitem("SettingID: " &$Startup[$i][5], $Item)    Next    Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)EndFunc#endregion#region OS InformationFunc _XML_ExtractOSInformation($file)  ControlSetText ("Extracting to XML", "", "Static1", "OS Information")   FileWriteLine($file, "  <OSInformation>")           Dim $OSs    _ComputerGetOSs($OSs)   For $i = 1 To $OSs[0][0] Step 1                 FileWriteLine($file, "      <OS>"& $OSs[$i][0]&"</OS>")     FileWriteLine($file, "      <BootDevice>"& $OSs[$i][1]&"</BootDevice>")     FileWriteLine($file, "      <BuildNumber>"& $OSs[$i][2]&"</BuildNumber>")       FileWriteLine($file, "      <BuildType>"& $OSs[$i][3]&"</BuildType>")       FileWriteLine($file, "      <CodeSet>"& $OSs[$i][5]&"</CodeSet>")       FileWriteLine($file, "      <Description>"& $OSs[$i][4]&"</Description>")       FileWriteLine($file, "      <CountryCode>"& $OSs[$i][6]&"</CountryCode>")       FileWriteLine($file, "      <CreationClassName>"& $OSs[$i][7]&"</CreationClassName>")       FileWriteLine($file, "      <CSCreationClassName>"& $OSs[$i][8]&"</CSCreationClassName>")       FileWriteLine($file, "      <CSDVersion>"& $OSs[$i][9]&"</CSDVersion>")     FileWriteLine($file, "      <CSName>"& $OSs[$i][10]&"</CSName>")        FileWriteLine($file, "      <CurrentTimeZone>"& $OSs[$i][11]&"</CurrentTimeZone>")      FileWriteLine($file, "      <DataExecutionPrevention_32BitApplications>"& $OSs[$i][12]&"</DataExecutionPrevention_32BitApplications>")      FileWriteLine($file, "      <DataExecutionPrevention_Available>"& $OSs[$i][13]&"</DataExecutionPrevention_Available>")      FileWriteLine($file, "      <DataExecutionPrevention_Drivers>"& $OSs[$i][14]&"</DataExecutionPrevention_Drivers>")      FileWriteLine($file, "      <DataExecutionPrevention_SupportPolicy>"& $OSs[$i][15]&"</DataExecutionPrevention_SupportPolicy>")      FileWriteLine($file, "      <Debug>"& $OSs[$i][16]&"</Debug>")      FileWriteLine($file, "      <Distributed>"& $OSs[$i][17]&"</Distributed>")      FileWriteLine($file, "      <EncryptionLevel>"& $OSs[$i][18]&"</EncryptionLevel>")      FileWriteLine($file, "      <ForegroundApplicationBoost>"& $OSs[$i][19]&"</ForegroundApplicationBoost>")        FileWriteLine($file, "      <FreePhysicalMemory>"& $OSs[$i][20]&"</FreePhysicalMemory>")        FileWriteLine($file, "      <FreeSpaceInPagingFiles>"& $OSs[$i][21]&"</FreeSpaceInPagingFiles>")        FileWriteLine($file, "      <FreeVirtualMemory>"& $OSs[$i][22]&"</FreeVirtualMemory>")      FileWriteLine($file, "      <InstallDate>"& $OSs[$i][23]&"</InstallDate>")      FileWriteLine($file, "      <LargeSystemCache>"& $OSs[$i][24]&"</LargeSystemCache>")        FileWriteLine($file, "      <LastBootUpTime>"& $OSs[$i][25]&"</LastBootUpTime>")        FileWriteLine($file, "      <LocalDateTime>"& $OSs[$i][26]&"</LocalDateTime>")      FileWriteLine($file, "      <Locale>"& $OSs[$i][27]&"</Locale>")        FileWriteLine($file, "      <Manufacturer>"& $OSs[$i][28]&"</Manufacturer>")        FileWriteLine($file, "      <MaxNumberOfProcesses>"& $OSs[$i][29]&"</MaxNumberOfProcesses>")        FileWriteLine($file, "      <MaxProcessMemorySize>"& $OSs[$i][30]&"</MaxProcessMemorySize>")        FileWriteLine($file, "      <NumberOfLicensedUsers>"& $OSs[$i][31]&"</NumberOfLicensedUsers>")      FileWriteLine($file, "      <NumberOfProcesses>"& $OSs[$i][32]&"</NumberOfProcesses>")      FileWriteLine($file, "      <NumberOfUsers>"& $OSs[$i][33]&"</NumberOfUsers>")      FileWriteLine($file, "      <Organization>"& $OSs[$i][34]&"</Organization>")        FileWriteLine($file, "      <OSLanguage>"& $OSs[$i][35]&"</OSLanguage>")        FileWriteLine($file, "      <OSProductSuite>"& $OSs[$i][36]&"</OSProductSuite>")        FileWriteLine($file, "      <OSType>"& $OSs[$i][37]&"</OSType>")        FileWriteLine($file, "      <OtherTypeDescription>"& $OSs[$i][38]&"</OtherTypeDescription>")        FileWriteLine($file, "      <PlusProductID>"& $OSs[$i][39]&"</PlusProductID>")      FileWriteLine($file, "      <PlusVersionNumber>"& $OSs[$i][40]&"</PlusVersionNumber>")      FileWriteLine($file, "      <Primary>"& $OSs[$i][41]&"</Primary>")      FileWriteLine($file, "      <ProductType>"& $OSs[$i][42]&"</ProductType>")      FileWriteLine($file, "      <QuantumLength>"& $OSs[$i][43]&"</QuantumLength>")      FileWriteLine($file, "      <QuantumType>"& $OSs[$i][44]&"</QuantumType>")      FileWriteLine($file, "      <RegisteredUser>"& $OSs[$i][45]&"</RegisteredUser>")        FileWriteLine($file, "      <SerialNumber>"& $OSs[$i][46]&"</SerialNumber>")        FileWriteLine($file, "      <ServicePackMajorVersion>"& $OSs[$i][47]&"</ServicePackMajorVersion>")      FileWriteLine($file, "      <ServicePackMinorVersion>"& $OSs[$i][48]&"</ServicePackMinorVersion>")      FileWriteLine($file, "      <SizeStoredInPagingFiles>"& $OSs[$i][49]&"</SizeStoredInPagingFiles>")      FileWriteLine($file, "      <Status>"& $OSs[$i][50]&"</Status>")        FileWriteLine($file, "      <SuiteMask>"& $OSs[$i][51]&"</SuiteMask>")      FileWriteLine($file, "      <SystemDevice>"& $OSs[$i][52]&"</SystemDevice>")        FileWriteLine($file, "      <SystemDirectory>"& $OSs[$i][53]&"</SystemDirectory>")      FileWriteLine($file, "      <SystemDrive>"& $OSs[$i][54]&"</SystemDrive>")      FileWriteLine($file, "      <TotalSwapSpaceSize>"& $OSs[$i][55]&"</TotalSwapSpaceSize>")        FileWriteLine($file, "      <TotalVirtualMemorySize>"& $OSs[$i][56]&"</TotalVirtualMemorySize>")        FileWriteLine($file, "      <TotalVisibleMemorySize>"& $OSs[$i][57]&"</TotalVisibleMemorySize>")        FileWriteLine($file, "      <Version>"& $OSs[$i][58]&"</Version>")      FileWriteLine($file, "      <WindowsDirectory>"& $OSs[$i][59]&"</WindowsDirectory>")    Next                FileWriteLine($file, "  </OSInformation>")                          EndFuncFunc _XML_GetOSInformation(ByRef $aOSInfo)   SplashTextOn("Gathering Windows Information", "Importing OS information"&@LF, 300, 100, -1, -1, 32, "", 12) Dim $aOSInfo[1][60], $i = 1 If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Software/OSInformation")     If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $aOSInfo[UBound($aOSInfo) + 1][60]                $aOSInfo[$i][0]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/OS"))             $aOSInfo[$i][1]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/BootDevice"))             $aOSInfo[$i][2]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/BuildNumber"))                $aOSInfo[$i][3]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/BuildType"))              $aOSInfo[$i][4]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Description"))                $aOSInfo[$i][5]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CodeSet"))                $aOSInfo[$i][6]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CountryCode"))                $aOSInfo[$i][7]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CreationClassName"))              $aOSInfo[$i][8]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CSCreationClassName"))                $aOSInfo[$i][9]  = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CSDVersion"))             $aOSInfo[$i][10] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CSName"))             $aOSInfo[$i][11] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/CurrentTimeZone"))                $aOSInfo[$i][12] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/DataExecutionPrevention_32BitApplications"))              $aOSInfo[$i][13] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/DataExecutionPrevention_Available"))              $aOSInfo[$i][14] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/DataExecutionPrevention_Drivers"))                $aOSInfo[$i][15] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/DataExecutionPrevention_SupportPolicy"))              $aOSInfo[$i][16] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Debug"))              $aOSInfo[$i][17] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Distributed"))                $aOSInfo[$i][18] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/EncryptionLevel"))                $aOSInfo[$i][19] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/ForegroundApplicationBoost"))             $aOSInfo[$i][20] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/FreePhysicalMemory"))             $aOSInfo[$i][21] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/FreeSpaceInPagingFiles"))             $aOSInfo[$i][22] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/FreeVirtualMemory"))              $aOSInfo[$i][23] = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/OSInformation/InstallDate")))                                $aOSInfo[$i][24] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/LargeSystemCache"))               $aOSInfo[$i][25] = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/OSInformation/LastBootUpTime")))             $aOSInfo[$i][26] = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/OSInformation/LocalDateTime")))              $aOSInfo[$i][27] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Locale"))             $aOSInfo[$i][28] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Manufacturer"))               $aOSInfo[$i][29] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/MaxNumberOfProcesses"))               $aOSInfo[$i][30] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/MaxProcessMemorySize"))               $aOSInfo[$i][31] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/NumberOfLicensedUsers"))              $aOSInfo[$i][32] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/NumberOfProcesses"))              $aOSInfo[$i][33] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/NumberOfUsers"))              $aOSInfo[$i][34] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Organization"))               $aOSInfo[$i][35] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/OSLanguage"))             $aOSInfo[$i][36] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/OSProductSuite"))             $aOSInfo[$i][37] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/OSType"))             $aOSInfo[$i][38] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/OtherTypeDescription"))               $aOSInfo[$i][39] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/PlusProductID"))              $aOSInfo[$i][40] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/PlusVersionNumber"))              $aOSInfo[$i][41] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Primary"))                $aOSInfo[$i][42] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/ProductType"))                $aOSInfo[$i][43] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/QuantumLength"))              $aOSInfo[$i][44] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/QuantumType"))                $aOSInfo[$i][45] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/RegisteredUser"))             $aOSInfo[$i][46] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/SerialNumber"))               $aOSInfo[$i][47] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/ServicePackMajorVersion"))                $aOSInfo[$i][48] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/ServicePackMinorVersion"))                $aOSInfo[$i][49] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/SizeStoredInPagingFiles"))                $aOSInfo[$i][50] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Status"))             $aOSInfo[$i][51] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/SuiteMask"))              $aOSInfo[$i][52] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/SystemDevice"))               $aOSInfo[$i][53] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/SystemDirectory"))                $aOSInfo[$i][54] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/SystemDrive"))                $aOSInfo[$i][55] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/TotalSwapSpaceSize"))             $aOSInfo[$i][56] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/TotalVirtualMemorySize"))             $aOSInfo[$i][57] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/TotalVisibleMemorySize"))             $aOSInfo[$i][58] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/Version"))                $aOSInfo[$i][59] = _RetFirst(_XMLGetValue ("Report/Software/OSInformation/WindowsDirectory"))           Next                            $aOSInfo[0][0] = UBound($aOSInfo) - 1           If $aOSInfo[0][0] < 1 Then              SetError(1, 1, 0)           EndIf       EndIf   EndIf                   EndFunc Func DisplayOSInformation() SplashTextOn("Gathering Windows Information", "retrieving OS Information", 300, 100, -1, -1, 32, "", 12)    Dim $OSs    If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetOSs($OSs)   Else        _XML_GetOSInformation($OSs) EndIf       ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $OSs[0][0] Step 1                         GUICtrlCreateTreeViewitem($OSs[$i][0], $Panel)      GUICtrlCreateTreeViewitem("Boot Device: " & $OSs[$i][1], $Panel)        GUICtrlCreateTreeViewitem("Build Number: " & $OSs[$i][2], $Panel)       GUICtrlCreateTreeViewitem("Build Type: " & $OSs[$i][3], $Panel)     GUICtrlCreateTreeViewitem("Description: " & $OSs[$i][4], $Panel)        GUICtrlCreateTreeViewitem("Code Set: " & $OSs[$i][5], $Panel)       GUICtrlCreateTreeViewitem("Country Code: " & $OSs[$i][6], $Panel)       GUICtrlCreateTreeViewitem("Creation Class Name: " & $OSs[$i][7], $Panel)        GUICtrlCreateTreeViewitem("CSCreation Class Name: " & $OSs[$i][8], $Panel)      GUICtrlCreateTreeViewitem("CSD Version: " & $OSs[$i][9], $Panel)        GUICtrlCreateTreeViewitem("CS Name: " & $OSs[$i][10], $Panel)       GUICtrlCreateTreeViewitem("Current Time Zone: " & $OSs[$i][11], $Panel)     GUICtrlCreateTreeViewitem("Data Execution Prevention_32BitApplications: " & $OSs[$i][12], $Panel)       GUICtrlCreateTreeViewitem("Data Execution Prevention_Available: " & $OSs[$i][13], $Panel)       GUICtrlCreateTreeViewitem("Data Execution Prevention_Drivers: " & $OSs[$i][14], $Panel)     GUICtrlCreateTreeViewitem("Data Execution Prevention_SupportPolicy: " & $OSs[$i][15], $Panel)       GUICtrlCreateTreeViewitem("Debug: " & $OSs[$i][16], $Panel)     GUICtrlCreateTreeViewitem("Distributed: " & $OSs[$i][17], $Panel)       GUICtrlCreateTreeViewitem("Encryption Level: " & $OSs[$i][18], $Panel)      GUICtrlCreateTreeViewitem("Foreground Application Boost: " & $OSs[$i][19], $Panel)      GUICtrlCreateTreeViewitem("Free Physical Memory: " & $OSs[$i][20], $Panel)      GUICtrlCreateTreeViewitem("Free Space In Paging Files: " & $OSs[$i][21], $Panel)        GUICtrlCreateTreeViewitem("Free Virtual Memory: " & $OSs[$i][22], $Panel)       GUICtrlCreateTreeViewitem("Install Date: " & $OSs[$i][23], $Panel)      GUICtrlCreateTreeViewitem("Large System Cache: " & $OSs[$i][24], $Panel)        GUICtrlCreateTreeViewitem("Last Boot Up Time: " & $OSs[$i][25], $Panel)     GUICtrlCreateTreeViewitem("Local Date Time: " & $OSs[$i][26], $Panel)       GUICtrlCreateTreeViewitem("Locale: " & $OSs[$i][27], $Panel)        GUICtrlCreateTreeViewitem("Manufacturer: " & $OSs[$i][28], $Panel)      GUICtrlCreateTreeViewitem("Max Number Of Processes: " & $OSs[$i][29], $Panel)       GUICtrlCreateTreeViewitem("Max Process Memory Size: " & $OSs[$i][30], $Panel)       GUICtrlCreateTreeViewitem("Number Of Licensed Users: " & $OSs[$i][31], $Panel)      GUICtrlCreateTreeViewitem("Number Of Processes: " & $OSs[$i][32], $Panel)       GUICtrlCreateTreeViewitem("Number Of Users: " & $OSs[$i][33], $Panel)       GUICtrlCreateTreeViewitem("Organization: " & $OSs[$i][34], $Panel)      GUICtrlCreateTreeViewitem("OS Language: " & $OSs[$i][35], $Panel)       GUICtrlCreateTreeViewitem("OS Product Suite: " & $OSs[$i][36], $Panel)      GUICtrlCreateTreeViewitem("OS Type: " & $OSs[$i][37], $Panel)       GUICtrlCreateTreeViewitem("Other Type Description: " & $OSs[$i][38], $Panel)        GUICtrlCreateTreeViewitem("Plus Product ID: " & $OSs[$i][39], $Panel)       GUICtrlCreateTreeViewitem("Plus Version Number: " & $OSs[$i][40], $Panel)       GUICtrlCreateTreeViewitem("Primary: " & $OSs[$i][41], $Panel)       GUICtrlCreateTreeViewitem("Product Type: " & $OSs[$i][42], $Panel)      GUICtrlCreateTreeViewitem("Quantum Length: " & $OSs[$i][43], $Panel)        GUICtrlCreateTreeViewitem("Quantum Type: " & $OSs[$i][44], $Panel)      GUICtrlCreateTreeViewitem("Registered User: " & $OSs[$i][45], $Panel)       GUICtrlCreateTreeViewitem("Serial Number: " & $OSs[$i][46], $Panel)     GUICtrlCreateTreeViewitem("Service Pack Major Version: " & $OSs[$i][47], $Panel)        GUICtrlCreateTreeViewitem("Service Pack Minor Version: " & $OSs[$i][48], $Panel)        GUICtrlCreateTreeViewitem("Size Stored In Paging Files: " & $OSs[$i][49], $Panel)       GUICtrlCreateTreeViewitem("Status: " & $OSs[$i][50], $Panel)        GUICtrlCreateTreeViewitem("Suite Mask: " & $OSs[$i][51], $Panel)        GUICtrlCreateTreeViewitem("System Device: " & $OSs[$i][52], $Panel)     GUICtrlCreateTreeViewitem("System Directory: " & $OSs[$i][53], $Panel)      GUICtrlCreateTreeViewitem("System Drive: " & $OSs[$i][54], $Panel)      GUICtrlCreateTreeViewitem("Total Swap Space Size: " & $OSs[$i][55], $Panel)     GUICtrlCreateTreeViewitem("Total Virtual Memory Size: " & $OSs[$i][56], $Panel)     GUICtrlCreateTreeViewitem("Total Visible Memory Size: " & $OSs[$i][57], $Panel)     GUICtrlCreateTreeViewitem("Version: " & $OSs[$i][58], $Panel)       GUICtrlCreateTreeViewitem("Windows Directory: " & $OSs[$i][59], $Panel) Next                    Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)  EndFunc#endregion#region Print JobsFunc _XML_ExtractPrintInfo($file)Dim $PrintJob   ControlSetText ("Extracting to XML", "", "Static1", "PrintJobs")    FileWriteLine($file, "  <PrintJobs>")           Dim $PrintJob   _ComputerGetPrintJobs($PrintJob)    For $i = 1 To $PrintJob[0][0] Step 1                        FileWriteLine($file, "      <PrintJob Name="""&$PrintJob[$i][0]&""">")      FileWriteLine($file, "          <DataType>"&$PrintJob[$i][1]&"</DataType>")     FileWriteLine($file, "          <Document>"&WriteProperXML($PrintJob[$i][2])&"</Document>")     FileWriteLine($file, "          <DriverName>"&$PrintJob[$i][3]&"</DriverName>")     FileWriteLine($file, "          <Description>"&$PrintJob[$i][4]&"</Description>")       FileWriteLine($file, "          <ElapsedTime>"&$PrintJob[$i][5]&"</ElapsedTime>")       FileWriteLine($file, "          <HostPrintQueue>"&$PrintJob[$i][6]&"</HostPrintQueue>")     FileWriteLine($file, "          <JobId>"&$PrintJob[$i][7]&"</JobId>")       FileWriteLine($file, "          <JobStatus>"&$PrintJob[$i][8]&"</JobStatus>")       FileWriteLine($file, "          <Name>"&WriteProperXML($PrintJob[$i][9])&"</Name>")     FileWriteLine($file, "          <Notify>"&$PrintJob[$i][10]&"</Notify>")        FileWriteLine($file, "          <Owner>"&$PrintJob[$i][11]&"</Owner>")      FileWriteLine($file, "          <PagesPrinted>"&$PrintJob[$i][12]&"</PagesPrinted>")        FileWriteLine($file, "          <Parameters>"&$PrintJob[$i][13]&"</Parameters>")        FileWriteLine($file, "          <PrintProcessor>"&$PrintJob[$i][14]&"</PrintProcessor>")        FileWriteLine($file, "          <Priority>"&$PrintJob[$i][15]&"</Priority>")        FileWriteLine($file, "          <Size>"&$PrintJob[$i][16]&"</Size>")        FileWriteLine($file, "          <StartTime>"&$PrintJob[$i][17]&"</StartTime>")      FileWriteLine($file, "          <Status>"&$PrintJob[$i][18]&"</Status>")        FileWriteLine($file, "          <StatusMask>"&$PrintJob[$i][19]&"</StatusMask>")        FileWriteLine($file, "          <TimeSubmitted>"&$PrintJob[$i][20]&"</TimeSubmitted>")      FileWriteLine($file, "          <TotalPages>"&$PrintJob[$i][21]&"</TotalPages>")        FileWriteLine($file, "          <UntilTime>"&$PrintJob[$i][22]&"</UntilTime>")                  FileWriteLine($file, "      </PrintJob>")   Next        FileWriteLine($file, "  </PrintJobs>")                  EndFuncFunc _XML_GetPrintJobs(ByRef $aPrintJobInfo) SplashTextOn("Gathering Windows Information", "Importing Print Jobs"&@LF, 300, 100, -1, -1, 32, "", 12) Dim $aPrintJobInfo[1][23], $i = 1   If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Software/PrintJobs/PrintJob")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $aPrintJobInfo[UBound($aPrintJobInfo) + 1][23]                Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Software/PrintJobs/*["&$i&"]",$aAttrName,$aAttrValue )                                               ControlSetText ("Gathering Windows Information", "", "Static1","Importing PrintJob:"&@LF&$aAttrValue[0])                $aPrintJobInfo[$i][0]  = $aAttrValue[0]                     $aPrintJobInfo[$i][1]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/DataType"))               $aPrintJobInfo[$i][2]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Document"))               $aPrintJobInfo[$i][3]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/DriverName"))             $aPrintJobInfo[$i][4]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Description"))                $aPrintJobInfo[$i][5]   = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/ElapsedTime")))                $aPrintJobInfo[$i][6]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/HostPrintQueue"))             $aPrintJobInfo[$i][7]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/JobId"))              $aPrintJobInfo[$i][8]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/JobStatus"))              $aPrintJobInfo[$i][9]   = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Name"))               $aPrintJobInfo[$i][10]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Notify"))             $aPrintJobInfo[$i][11]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Owner"))              $aPrintJobInfo[$i][12]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/PagesPrinted"))               $aPrintJobInfo[$i][13]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Parameters"))             $aPrintJobInfo[$i][14]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/PrintProcessor"))             $aPrintJobInfo[$i][15]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Priority"))               $aPrintJobInfo[$i][16]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Size"))               $aPrintJobInfo[$i][17]  = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/StartTime")))              $aPrintJobInfo[$i][18]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/Status"))             $aPrintJobInfo[$i][19]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/StatusMask"))             $aPrintJobInfo[$i][20]  = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/TimeSubmitted")))              $aPrintJobInfo[$i][21]  = _RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/TotalPages"))             $aPrintJobInfo[$i][22]  = __StringToDate(_RetFirst(_XMLGetValue ("Report/Software/PrintJobs/PrintJob["&$i&"]/UntilTime")))          Next                            $aPrintJobInfo[0][0] = UBound($aPrintJobInfo) - 1           If $aPrintJobInfo[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf       EndIfEndFuncFunc DisplayPrintJobs() SplashTextOn("Gathering Windows Information", "retrieving Print Jobs", 300, 100, -1, -1, 32, "", 12)    Dim $PrintJob       If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetPrintJobs($PrintJob)    Else        _XML_GetPrintJobs($PrintJob)    EndIf           ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE) For $i = 1 To $PrintJob[0][0] Step 1                            $Item = GUICtrlCreateTreeViewitem($PrintJob[$i][0], $Panel)                         GUICtrlCreateTreeViewitem("DataType: " & $PrintJob[$i][1], $Item)       GUICtrlCreateTreeViewitem("Document: " & $PrintJob[$i][2], $Item)       GUICtrlCreateTreeViewitem("DriverName: " & $PrintJob[$i][3], $Item)     GUICtrlCreateTreeViewitem("Description: " & $PrintJob[$i][4], $Item)        GUICtrlCreateTreeViewitem("ElapsedTime: " & $PrintJob[$i][5], $Item)        GUICtrlCreateTreeViewitem("HostPrintQueue: " & $PrintJob[$i][6], $Item)     GUICtrlCreateTreeViewitem("JobId: " & $PrintJob[$i][7], $Item)      GUICtrlCreateTreeViewitem("JobStatus: " & $PrintJob[$i][8], $Item)      GUICtrlCreateTreeViewitem("Name: " & $PrintJob[$i][9], $Item)       GUICtrlCreateTreeViewitem("Notify: " & $PrintJob[$i][10], $Item)        GUICtrlCreateTreeViewitem("Owner: " & $PrintJob[$i][11], $Item)     GUICtrlCreateTreeViewitem("PagesPrinted: " & $PrintJob[$i][12], $Item)      GUICtrlCreateTreeViewitem("Parameters: " & $PrintJob[$i][13], $Item)        GUICtrlCreateTreeViewitem("PrintProcessor: " & $PrintJob[$i][14], $Item)        GUICtrlCreateTreeViewitem("Priority: " & $PrintJob[$i][15], $Item)      GUICtrlCreateTreeViewitem("Size: " & $PrintJob[$i][16], $Item)      GUICtrlCreateTreeViewitem("StartTime: " & $PrintJob[$i][17], $Item)     GUICtrlCreateTreeViewitem("Status: " & $PrintJob[$i][18], $Item)        GUICtrlCreateTreeViewitem("StatusMask: " & $PrintJob[$i][19], $Item)        GUICtrlCreateTreeViewitem("TimeSubmitted: " & $PrintJob[$i][20], $Item)     GUICtrlCreateTreeViewitem("TotalPages: " & $PrintJob[$i][21], $Item)        GUICtrlCreateTreeViewitem("UntilTime: " & $PrintJob[$i][22], $Item) Next                    Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)      EndFunc#endregion#region Windows UpdatesFunc _XML_ExtractUpdateInformation($file)   ControlSetText ("Extracting to XML", "", "Static1", "Applied Updates")  FileWriteLine($file, "  <Updates>")         Dim $InstalledUpdates   _GetUpdates($InstalledUpdates) ;Defaults to "FIXED" For $i = 1 To $InstalledUpdates[0][0] Step 1                    FileWriteLine($file, "      <Update Title="""&$InstalledUpdates[$i][0]&""">")       FileWriteLine($file, "          <Date>"&$InstalledUpdates[$i][1]&"</Date>")     FileWriteLine($file, "          <ResultCode>"&$InstalledUpdates[$i][2]&"</ResultCode>")     FileWriteLine($file, "          <Operation>"&$InstalledUpdates[$i][3]&"</Operation>")       FileWriteLine($file, "          <Description>"&WriteProperXML($InstalledUpdates[$i][4])&"</Description>")       FileWriteLine($file, "          <ClientApplicationID>"&$InstalledUpdates[$i][5]&"</ClientApplicationID>")       FileWriteLine($file, "          <ServerSelection>"&$InstalledUpdates[$i][6]&"</ServerSelection>")       FileWriteLine($file, "          <ServiceID>"&$InstalledUpdates[$i][7]&"</ServiceID>")               FileWriteLine($file, "          <SupportURL>"&WriteProperXML($InstalledUpdates[$i][8])&"</SupportURL>")     FileWriteLine($file, "          <UninstallationNotes>"&WriteProperXML($InstalledUpdates[$i][9])&"</UninstallationNotes>")       FileWriteLine($file, "      </Update>") Next                FileWriteLine($file, "  </Updates>")EndFuncFunc _XML_GetUpdates(ByRef $Updates) SplashTextOn("Gathering Windows Information", "Importing Updates"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $Updates[1][10], $i = 1 If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Software/Updates/Update")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $Updates[UBound($Updates) + 1][10]                Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Software/Updates/*["&$i&"]",$aAttrName,$aAttrValue )                     ControlSetText ("Gathering Windows Information", "", "Static1","Importing Update:"&@LF&$aAttrValue[0])              $updates[$i][0]  = $aAttrValue[0]                               $updates[$i][1] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/Date"))               $updates[$i][2] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/ResultCode"))             $updates[$i][3] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/Operation"))              $updates[$i][4] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/Description"))                $updates[$i][5] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/ClientApplicationID"))                $updates[$i][6] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/ServerSelection"))                $updates[$i][7] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/ServiceID"))              $updates[$i][8] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/SupportURL"))             $updates[$i][9] = _RetFirst(_XMLGetValue ("Report/Software/Updates/Update["&$i&"]/UninstallationNotes"))                            Next            $updates[0][0] = UBound($updates) - 1           If $updates[0][0] < 1 Then              SetError(1, 1, 0)           EndIf       EndIf   Else        SetError(1, 2, 0)   EndIf   EndFuncFunc _GetUpdates(ByRef $updates) Dim $i = 1, $updates[1][10] If(VerifyAgentInfo() == 1) Then     SplashOff();        MsgBox(0,"Windows Update Agent", "The windows update agent requires a newer version in order to be used."&@LF&"More information can be found at : http://msdn2.microsoft.com/en-us/library/a...85.aspx");   Else        $UpdateSession = ObjCreate("Microsoft.Update.Session")      $UpdateSearcher = $UpdateSession.CreateUpdateSearcher       $colHistory = $UpdateSearcher.QueryHistory(1, $UpdateSearcher.GetTotalHistoryCount)         If IsObj($colHistory) Then          For $objEntry in $colHistory                ReDim $updates[UBound($updates) + 1][10]                $updates[$i][0] = $objEntry.Title               $updates[$i][1] = $objEntry.Date                $updates[$i][2] = $objEntry.ResultCode              $updates[$i][3] = $objEntry.Operation               $updates[$i][4] = $objEntry.Description             $updates[$i][5] = $objEntry.ClientApplicationID             $updates[$i][6] = $objEntry.ServerSelection             $updates[$i][7] = $objEntry.ServiceID               $updates[$i][8] = $objEntry.SupportURL              $updates[$i][9] = $objEntry.UninstallationNotes             $i += 1         Next            $updates[0][0] = UBound($updates) - 1           If $updates[0][0] < 1 Then              SetError(1, 1, 0)           EndIf       Else            SetError(1, 2, 0)       EndIf   EndIfEndFuncFunc DisplayUpdates()   SplashTextOn("Gathering Windows Information", "retrieving Windows Updates", 300, 100, -1, -1, 32, "", 12)   Dim $InstalledUpdates   If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _GetUpdates($InstalledUpdates)  Else        _XML_GetUpdates($InstalledUpdates)  EndIf       ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE)                 For $i = 1 To $InstalledUpdates[0][0] Step 1        $Item = GUICtrlCreateTreeViewitem($InstalledUpdates[$i][0], $Panel)                     GUICtrlCreateTreeViewitem("Date: " & ConvertDate($InstalledUpdates[$i][1]), $Item)  GUICtrlCreateTreeViewitem("ResultCode: " & $InstalledUpdates[$i][2], $Item) GUICtrlCreateTreeViewitem("Operation: " & $InstalledUpdates[$i][3], $Item)  GUICtrlCreateTreeViewitem("Description: " & $InstalledUpdates[$i][4], $Item)    GUICtrlCreateTreeViewitem("ClientApplicationID: " & $InstalledUpdates[$i][5], $Item)    GUICtrlCreateTreeViewitem("ServerSelection: " & $InstalledUpdates[$i][6], $Item)    GUICtrlCreateTreeViewitem("ServiceID: " & $InstalledUpdates[$i][7], $Item)  GUICtrlCreateTreeViewitem("SupportURL: " & $InstalledUpdates[$i][8], $Item) GUICtrlCreateTreeViewitem("UninstallationNotes: " & $InstalledUpdates[$i][9], $Item)    Next                        Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)  EndFunc#endregion#endregion#region Hardware#region HardDrive InformationFunc _XML_ExtractDriveInformation($file)    ControlSetText ("Extracting to XML", "", "Static1", "Drive Information")    Dim $Drives _ComputerGetDrives($Drives) ;Defaults to "FIXED"    FileWriteLine($file, "      <DriveInformation>")            For $i = 1 To $Drives[0][0] Step 1                  FileWriteLine($file, "          <Drive Name="""&WriteProperXML($Drives[$i][0])&""">")       FileWriteLine($file, "              <FileSystem>"&$Drives[$i][1]&"</FileSystem>")       FileWriteLine($file, "              <Label>"&WriteProperXML($Drives[$i][2])&"</Label>")     FileWriteLine($file, "              <Serial>"&$Drives[$i][3]&"</Serial>")       FileWriteLine($file, "              <FreeSpace>"&$Drives[$i][4]&"</FreeSpace>")     FileWriteLine($file, "              <TotalSpace>"&$Drives[$i][5]&"</TotalSpace>")       FileWriteLine($file, "          </Drive>")  Next    FileWriteLine($file, "      </DriveInformation>")                       EndFuncFunc _XML_GetDrives(ByRef $drive)    SplashTextOn("Gathering Windows Information", "Importing Drives"&@LF, 300, 100, -1, -1, 32, "", 12) Dim $drive[1][6], $i = 1    If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Hardware/DriveInformation/Drive")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $drive[UBound($drive) + 1][6]             Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Hardware/DriveInformation/*["&$i&"]",$aAttrName,$aAttrValue )                        ControlSetText ("Gathering Windows Information", "", "Static1","Importing Drive:"&@LF&$aAttrValue[0])               $drive[$i][0]  = $aAttrValue[0]                             $drive[$i][1] = _RetFirst(_XMLGetValue ("Report/Hardware/DriveInformation/Drive["&$i&"]/FileSystem"))               $drive[$i][2] = _RetFirst(_XMLGetValue ("Report/Hardware/DriveInformation/Drive["&$i&"]/Label"))                $drive[$i][3] = _RetFirst(_XMLGetValue ("Report/Hardware/DriveInformation/Drive["&$i&"]/Serial"))               $drive[$i][4] = _RetFirst(_XMLGetValue ("Report/Hardware/DriveInformation/Drive["&$i&"]/FreeSpace"))                $drive[$i][5] = _RetFirst(_XMLGetValue ("Report/Hardware/DriveInformation/Drive["&$i&"]/TotalSpace"))           Next            $drive[0][0] = UBound($drive) - 1           If $drive[0][0] < 1 Then                SetError(1, 1, 0)           EndIf       EndIf   Else        SetError(1, 2, 0)   EndIf       EndFuncFunc DisplayDrives() SplashTextOn("Gathering Windows Information", "retrieving Drive Layout", 300, 100, -1, -1, 32, "", 12)  Dim $Drives If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetDrives($Drives) Else        _XML_GetDrives($Drives) EndIf           ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE)                 For $i = 1 To $Drives[0][0] Step 1              $Item = GUICtrlCreateTreeViewitem($Drives[$i][0], $Panel)                       GUICtrlCreateTreeViewitem("FileSystem: " & $Drives[$i][1], $Item)   GUICtrlCreateTreeViewitem("Label: " & $Drives[$i][2], $Item)    GUICtrlCreateTreeViewitem("Serial #: " & $Drives[$i][3], $Item) GUICtrlCreateTreeViewitem("Free Space: " & Round($Drives[$i][4] / 1024, 2) & "GB", $Item)   GUICtrlCreateTreeViewitem("Total Space: " &  Round($Drives[$i][5] / 1024, 2) & "GB", $Item) Next        Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)EndFunc#endregion#region Processor InformationFunc _XML_ExtractProcessorInformation($file)    ControlSetText ("Extracting to XML", "", "Static1", "Processor Information")    Dim $Items  _ComputerGetProcessors($Items) ;Defaults to "FIXED" FileWriteLine($file, "      <Processors>")          For $i = 1 To $Items[0][0] Step 1           FileWriteLine($file, "          <Processor Name="""&$Items[$i][0]&""">")        FileWriteLine($file, "              <AddressWidth>"&$Items[$i][1]&"</AddressWidth>")        FileWriteLine($file, "              <Architecture>"&$Items[$i][2]&"</Architecture>")        FileWriteLine($file, "              <Availability>"&$Items[$i][3]&"</Availability>")        FileWriteLine($file, "              <Description>"&$Items[$i][4]&"</Description>")      FileWriteLine($file, "              <ConfigManagerErrorCode>"&$Items[$i][5]&"</ConfigManagerErrorCode>")        FileWriteLine($file, "              <ConfigManagerUserConfig>"&$Items[$i][6]&"</ConfigManagerUserConfig>")      FileWriteLine($file, "              <CPUStatus>"&$Items[$i][7]&"</CPUStatus>")      FileWriteLine($file, "              <CreationClassName>"&$Items[$i][8]&"</CreationClassName>")      FileWriteLine($file, "              <CurrentClockSpeed>"&$Items[$i][9]&"</CurrentClockSpeed>")      FileWriteLine($file, "              <CurrentVoltage>"&$Items[$i][10]&"</CurrentVoltage>")       FileWriteLine($file, "              <DataWidth>"&$Items[$i][11]&"</DataWidth>")     FileWriteLine($file, "              <DeviceID>"&$Items[$i][12]&"</DeviceID>")       FileWriteLine($file, "              <ErrorCleared>"&$Items[$i][13]&"</ErrorCleared>")       FileWriteLine($file, "              <ErrorDescription>"&$Items[$i][14]&"</ErrorDescription>")       FileWriteLine($file, "              <ExtClock>"&$Items[$i][15]&"</ExtClock>")       FileWriteLine($file, "              <Family>"&$Items[$i][16]&"</Family>")       FileWriteLine($file, "              <L2CacheSize>"&$Items[$i][17]&"</L2CacheSize>")     FileWriteLine($file, "              <L2CacheSpeed>"&$Items[$i][18]&"</L2CacheSpeed>")       FileWriteLine($file, "              <LastErrorCode>"&$Items[$i][19]&"</LastErrorCode>")     FileWriteLine($file, "              <Level>"&$Items[$i][20]&"</Level>")     FileWriteLine($file, "              <LoadPercentage>"&$Items[$i][21]&"</LoadPercentage>")       FileWriteLine($file, "              <Manufacturer>"&$Items[$i][22]&"</Manufacturer>")       FileWriteLine($file, "              <MaxClockSpeed>"&$Items[$i][23]&"</MaxClockSpeed>")     FileWriteLine($file, "              <OtherFamilyDescription>"&$Items[$i][24]&"</OtherFamilyDescription>")       FileWriteLine($file, "              <PNPDeviceID>"&$Items[$i][25]&"</PNPDeviceID>")     FileWriteLine($file, "              <PowerManagementCapabilities>"&$Items[$i][26]&"</PowerManagementCapabilities>")     FileWriteLine($file, "              <PowerManagementSupported>"&$Items[$i][27]&"</PowerManagementSupported>")       FileWriteLine($file, "              <ProcessorID>"&$Items[$i][28]&"</ProcessorID>")     FileWriteLine($file, "              <ProcessorType>"&$Items[$i][29]&"</ProcessorType>")     FileWriteLine($file, "              <Revision>"&$Items[$i][30]&"</Revision>")       FileWriteLine($file, "              <Role>"&$Items[$i][31]&"</Role>")       FileWriteLine($file, "              <SocketDesignation>"&$Items[$i][32]&"</SocketDesignation>")     FileWriteLine($file, "              <Status>"&$Items[$i][33]&"</Status>")       FileWriteLine($file, "              <StatusInfo>"&$Items[$i][34]&"</StatusInfo>")       FileWriteLine($file, "              <Stepping>"&$Items[$i][35]&"</Stepping>")       FileWriteLine($file, "              <SystemCreationClassName>"&$Items[$i][36]&"</SystemCreationClassName>")     FileWriteLine($file, "              <SystemName>"&$Items[$i][37]&"</SystemName>")       FileWriteLine($file, "              <UniqueID>"&$Items[$i][38]&"</UniqueID>")       FileWriteLine($file, "              <UpgradeMethod>"&$Items[$i][39]&"</UpgradeMethod>")     FileWriteLine($file, "              <Version>"&$Items[$i][40]&"</Version>")     FileWriteLine($file, "              <VoltageCaps>"&$Items[$i][41]&"</VoltageCaps>")     FileWriteLine($file, "          </Processor>")  Next                FileWriteLine($file, "      </Processors>")EndFuncFunc _XML_GetProcessors(ByRef $aProcessorInfo)    SplashTextOn("Gathering Windows Information", "Importing Processor Information"&@LF, 300, 100, -1, -1, 32, "", 12)  Dim $aProcessorInfo[1][42], $i = 1  If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Hardware/Processors/Processor")      If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $aProcessorInfo[UBound($aProcessorInfo) + 1][42]              Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Hardware/Processors/*["&$i&"]",$aAttrName,$aAttrValue )                      ControlSetText ("Gathering Windows Information", "", "Static1","Importing Processor:"&@LF&$aAttrValue[0])               $aProcessorInfo[$i][0]  = $aAttrValue[0]                $aProcessorInfo[$i][1]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/AddressWidth"))             $aProcessorInfo[$i][2]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Architecture"))             $aProcessorInfo[$i][3]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Availability"))             $aProcessorInfo[$i][4]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Description"))              $aProcessorInfo[$i][5]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ConfigManagerErrorCode"))               $aProcessorInfo[$i][6]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ConfigManagerUserConfig"))              $aProcessorInfo[$i][7]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/CpuStatus"))                $aProcessorInfo[$i][8]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/CreationClassName"))                $aProcessorInfo[$i][9]  = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/CurrentClockSpeed"))                $aProcessorInfo[$i][10] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/CurrentVoltage"))               $aProcessorInfo[$i][11] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/DataWidth"))                $aProcessorInfo[$i][12] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/DeviceID"))             $aProcessorInfo[$i][13] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ErrorCleared"))             $aProcessorInfo[$i][14] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ErrorDescription"))             $aProcessorInfo[$i][15] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ExtClock"))             $aProcessorInfo[$i][16] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Family"))               $aProcessorInfo[$i][17] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/L2CacheSize"))              $aProcessorInfo[$i][18] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/L2CacheSpeed"))             $aProcessorInfo[$i][19] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/LastErrorCode"))                $aProcessorInfo[$i][20] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Level"))                $aProcessorInfo[$i][21] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/LoadPercentage"))               $aProcessorInfo[$i][22] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Manufacturer"))             $aProcessorInfo[$i][23] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/MaxClockSpeed"))                $aProcessorInfo[$i][24] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/OtherFamilyDescription"))               $aProcessorInfo[$i][25] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/PNPDeviceID"))              $aProcessorInfo[$i][26] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/PowerManagementCapabilities"))              $aProcessorInfo[$i][27] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/PowerManagementSupported"))             $aProcessorInfo[$i][28] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ProcessorId"))              $aProcessorInfo[$i][29] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/ProcessorType"))                $aProcessorInfo[$i][30] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Revision"))             $aProcessorInfo[$i][31] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Role"))             $aProcessorInfo[$i][32] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/SocketDesignation"))                $aProcessorInfo[$i][33] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Status"))               $aProcessorInfo[$i][34] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/StatusInfo"))               $aProcessorInfo[$i][35] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Stepping"))             $aProcessorInfo[$i][36] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/SystemCreationClassName"))              $aProcessorInfo[$i][37] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/SystemName"))               $aProcessorInfo[$i][38] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/UniqueId"))             $aProcessorInfo[$i][39] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/UpgradeMethod"))                $aProcessorInfo[$i][40] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/Version"))              $aProcessorInfo[$i][41] = _RetFirst(_XMLGetValue ("Report/Hardware/Processors/Processor["&$i&"]/VoltageCaps"))          Next            $aProcessorInfo[0][0] = UBound($aProcessorInfo) - 1         If $aProcessorInfo[0][0] < 1 Then               SetError(1, 1, 0)           EndIf       EndIf   Else        SetError(1, 2, 0)   EndIf       EndFuncFunc DisplayProcessors() SplashTextOn("Gathering Windows Information", "retrieving Processor Information", 300, 100, -1, -1, 32, "", 12) Dim $Processors If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _ComputerGetProcessors($Processors) Else        _XML_GetProcessors($Processors) EndIf       ControlSetText ("Gathering Windows Information", "", "Static1", "Populating list")  GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE)                 For $i = 1 To $Processors[0][0] Step 1          $Item = GUICtrlCreateTreeViewitem($Processors[$i][0], $Panel)                                               GUICtrlCreateTreeViewitem("Address Width: " & $Processors[$i][1],$Item)     GUICtrlCreateTreeViewitem("Architecture: " & $Processors[$i][2],$Item)      GUICtrlCreateTreeViewitem("Availability: " & $Processors[$i][3],$Item)      GUICtrlCreateTreeViewitem("Description: " & $Processors[$i][4],$Item)       GUICtrlCreateTreeViewitem("Config Manager Error Code: " & $Processors[$i][5],$Item)     GUICtrlCreateTreeViewitem("Config Manager User Config: " & $Processors[$i][6],$Item)        GUICtrlCreateTreeViewitem("CPU Status: " & $Processors[$i][7],$Item)        GUICtrlCreateTreeViewitem("Creation Class Name: " & $Processors[$i][8],$Item)       GUICtrlCreateTreeViewitem("Current Clock Speed: " & $Processors[$i][9],$Item)       GUICtrlCreateTreeViewitem("Current Voltage: " & $Processors[$i][10],$Item)      GUICtrlCreateTreeViewitem("Data Width: " & $Processors[$i][11],$Item)       GUICtrlCreateTreeViewitem("Device ID: " & $Processors[$i][12],$Item)        GUICtrlCreateTreeViewitem("Error Cleared: " & $Processors[$i][13],$Item)        GUICtrlCreateTreeViewitem("Error Description: " & $Processors[$i][14],$Item)        GUICtrlCreateTreeViewitem("Ext Clock: " & $Processors[$i][15],$Item)        GUICtrlCreateTreeViewitem("Family: " & $Processors[$i][16],$Item)       GUICtrlCreateTreeViewitem("L2 Cache Size: " & $Processors[$i][17],$Item)        GUICtrlCreateTreeViewitem("L2 Cache Speed: " & $Processors[$i][18],$Item)       GUICtrlCreateTreeViewitem("Last Error Code: " & $Processors[$i][19],$Item)      GUICtrlCreateTreeViewitem("Level: " & $Processors[$i][20],$Item)        GUICtrlCreateTreeViewitem("Load Percentage: " & $Processors[$i][21],$Item)      GUICtrlCreateTreeViewitem("Manufacturer: " & $Processors[$i][22],$Item)     GUICtrlCreateTreeViewitem("Max Clock Speed: " & $Processors[$i][23],$Item)      GUICtrlCreateTreeViewitem("Other Family Description: " & $Processors[$i][24],$Item)     GUICtrlCreateTreeViewitem("PNP Device ID: " & $Processors[$i][25],$Item)        GUICtrlCreateTreeViewitem("Power Management Capabilities: " & $Processors[$i][26],$Item)        GUICtrlCreateTreeViewitem("Power Management Supported: " & $Processors[$i][27],$Item)       GUICtrlCreateTreeViewitem("Processor ID: " & $Processors[$i][28],$Item)     GUICtrlCreateTreeViewitem("Processor Type: " & $Processors[$i][29],$Item)       GUICtrlCreateTreeViewitem("Revision: " & $Processors[$i][30],$Item)     GUICtrlCreateTreeViewitem("Role: " & $Processors[$i][31],$Item)     GUICtrlCreateTreeViewitem("Socket Designation: " & $Processors[$i][32],$Item)       GUICtrlCreateTreeViewitem("Status: " & $Processors[$i][33],$Item)       GUICtrlCreateTreeViewitem("Status Info: " & $Processors[$i][34],$Item)      GUICtrlCreateTreeViewitem("Stepping: " & $Processors[$i][35],$Item)     GUICtrlCreateTreeViewitem("System Creation Class Name: " & $Processors[$i][36],$Item)       GUICtrlCreateTreeViewitem("System Name: " & $Processors[$i][37],$Item)      GUICtrlCreateTreeViewitem("Unique ID: " & $Processors[$i][38],$Item)        GUICtrlCreateTreeViewitem("Upgrade Method: " & $Processors[$i][39],$Item)       GUICtrlCreateTreeViewitem("Version: " & $Processors[$i][40],$Item)      GUICtrlCreateTreeViewitem("Voltage Caps: " & $Processors[$i][41],$Item) Next                        Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)      EndFunc#endregion#endregion#region Configuration#region EnvironmentVariablesFunc _XML_GetEnvironmentVariables(ByRef $Environment)   SplashTextOn("Gathering Windows Information", "Importing Updates"&@LF, 300, 100, -1, -1, 32, "", 12)    Dim $Environment[1][8], $i = 1  If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Configuration/EnvironmentVariables/Variable")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $Environment[UBound($Environment) + 1][8]             Dim $aAttrName[1], $aAttrValue[1], $node                    $node = _XMLGetAllAttrib("//Report/Configuration/EnvironmentVariables/*["&$i&"]",$aAttrName,$aAttrValue )                       ControlSetText ("Gathering Windows Information", "", "Static1","Importing Update:"&@LF&$aAttrValue[0])              $Environment[$i][0]  = $aAttrValue[0]                               $Environment[$i][1] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/Description"))                $Environment[$i][2] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/InstallDate"))                $Environment[$i][3] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/Caption"))                $Environment[$i][4] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/Status"))             $Environment[$i][5] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/SystemVariable"))             $Environment[$i][6] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/UserName"))               $Environment[$i][7] = _RetFirst(_XMLGetValue ("Report/Configuration/EnvironmentVariables/Variable["&$i&"]/VariableValue"))                      Next            $Environment[0][0] = UBound($Environment) - 1           If $Environment[0][0] < 1 Then              SetError(1, 1, 0)           EndIf       EndIf   Else        SetError(1, 2, 0)   EndIf       EndFuncFunc _XML_ExtractEnvironmentVariables($file) ControlSetText ("Extracting to XML", "", "Static1", "Environment Variables")    Dim $Environment    _GetEnvironmentVariables($Environment) ;Defaults to "FIXED" FileWriteLine($file, "      <EnvironmentVariables>")            For $i = 1 To $Environment[0][0] Step 1                 FileWriteLine($file, "          <Variable Name="""&WriteProperXML($Environment[$i][0])&""">")       FileWriteLine($file, "              <Description>"&WriteProperXML($Environment[$i][1])&"</Description>")        FileWriteLine($file, "              <InstallDate>"&WriteProperXML($Environment[$i][2])&"</InstallDate>")        FileWriteLine($file, "              <Caption>"&WriteProperXML($Environment[$i][3])&"</Caption>")        FileWriteLine($file, "              <Status>"&WriteProperXML($Environment[$i][4])&"</Status>")      FileWriteLine($file, "              <SystemVariable>"&WriteProperXML($Environment[$i][5])&"</SystemVariable>")      FileWriteLine($file, "              <UserName>"&WriteProperXML($Environment[$i][6])&"</UserName>")      FileWriteLine($file, "              <VariableValue>"&WriteProperXML($Environment[$i][7])&"</VariableValue>")        FileWriteLine($file, "          </Variable>")   Next        FileWriteLine($file, "      </EnvironmentVariables>")                       EndFuncFunc _GetEnvironmentVariables(ByRef $Environment)    Local $colItems, $objWMIService, $objItem   Dim $Environment[1][8],$i = 1       $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")   $colItems = $objWMIService.ExecQuery("Select * from Win32_Environment", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)   If IsObj($colItems) Then        For $objItem In $colItems           ReDim $Environment[UBound($Environment) + 1][8]         $Environment[$i][0]  = $objItem.Name            $Environment[$i][1]  = $objItem.Description         $Environment[$i][2]  = $objItem.InstallDate         $Environment[$i][3]  = $objItem.Caption         $Environment[$i][4]  = $objItem.Status          $Environment[$i][5]  = $objItem.SystemVariable          $Environment[$i][6]  = $objItem.UserName            $Environment[$i][7]  = $objItem.VariableValue               $i += 1     Next        $Environment[0][0] = UBound($Environment) - 1       If $Environment[0][0] < 1 Then          SetError(1, 1, 0)       EndIf   Else        SetError(1, 2, 0)   EndIfEndFuncFunc DisplayEnvironmentVars()   SplashTextOn("Gathering Windows Information", "retrieving Environment Variables", 300, 100, -1, -1, 32, "", 12) Dim $Environment        If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _GetEnvironmentVariables($Environment)  Else        _XML_GetEnvironmentVariables($Environment)  EndIf       ControlSetText("Gathering Windows Information", "", "Static1", "Populating list")   GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      Sleep(250)  $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)  GUICtrlSetState ($Panel, $GUI_HIDE)                 For $i = 1 To $Environment[0][0] Step 1                 $Item = GUICtrlCreateTreeViewitem($Environment[$i][0], $Panel)                          GUICtrlCreateTreeViewitem("Description: " & $Environment[$i][1],$Item)                          GUICtrlCreateTreeViewitem("InstallDate: " & $Environment[$i][2],$Item)                          GUICtrlCreateTreeViewitem("Caption: " & $Environment[$i][3],$Item)                          GUICtrlCreateTreeViewitem("Status: " & $Environment[$i][4],$Item)                           GUICtrlCreateTreeViewitem("SystemVariable: " & $Environment[$i][5],$Item)                   GUICtrlCreateTreeViewitem("UserName: " & $Environment[$i][6],$Item)                 GUICtrlCreateTreeViewitem("VariableValue: " & $Environment[$i][7],$Item)    Next                        Sleep(1000) SplashOff() GUICtrlSetState ($Panel, $GUI_SHOW) GUISetState (@SW_ENABLE, $maindlg)      EndFunc#endregion#region BOOT.INIFunc _XML_GetBootINI(ByRef $bootini)   SplashTextOn("Gathering Windows Information", "Importing Boot.ini"&@LF, 300, 100, -1, -1, 32, "", 12)   Dim $bootini[1], $i = 1 If FileExists($ImportFile) Then     $ret = _XMLFileOpen($ImportFile)        if $ret =0 then Exit                            Dim $i_Nodes = _XMLGetNodeCount ("//Report/Configuration/BootINI/*")        If $i_Nodes > 0 Then                        for $i= 1 to $i_Nodes Step 1                ReDim $bootini[UBound($bootini) + 1]                $bootini[$i] = _RetFirst(_XMLGetValue ("Report/Configuration/BootINI/*["&$i&"]"))           Next            $bootini[0] = UBound($bootini) - 1          If $bootini[0] < 1 Then             SetError(1, 1, 0)           EndIf       EndIf   Else        SetError(1, 2, 0)   EndIf   If @error Then      SplashOff()     ReDim $bootini[UBound($bootini) + 1]        $bootini[1]="no information"        $bootini[0] = UBound($bootini) - 1  EndIfEndFuncFunc _XML_ExtractBootINI($file) ControlSetText ("Extracting to XML", "", "Static1", "Boot INI") Dim $bootini    _GetBootINI($bootini)   FileWriteLine($file, "      <BootINI>")         For $i = 1 To $bootini[0] Step 1                    FileWriteLine($file, "          <Line"&$i&">"&$bootini[$i]&"</Line"&$i&">") Next    FileWriteLine($file, "      </BootINI>")                        EndFuncFunc _GetBootINI(ByRef $bootini) If (_FileReadToArray(@HomeDrive&"\boot.ini", $bootini) == 0)  Then ; falure         SetError(1) EndIfEndFuncFunc DisplayBootINI()   Dim $BootINI    If (GUICtrlRead($radio1) = $GUI_CHECKED) Then       _GetBootINI($BootINI)   Else        _XML_GetBootINI($BootINI)   EndIf       If NOT @error Then      GUISetState (@SW_DISABLE, $maindlg)     GUICtrlDelete ($Panel)      $Panel = GUICtrlCreateTreeView ($TreeX,$TreeY,$TreeWidth,$TreeHeight,BitOr($TVS_HASBUTTONS, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)       GUICtrlSetState ($Panel, $GUI_HIDE)     For $i = 1 To $BootINI[0] Step 1            GUICtrlCreateTreeViewitem($BootINI[$i], $Panel)     Next                        Sleep(1000)     SplashOff()     GUICtrlSetState ($Panel, $GUI_SHOW)     GUISetState (@SW_ENABLE, $maindlg)  EndIfEndFunc#endregion#endregion#endregion#region Extra FunctionsFunc VerifyAgentInfo() $AgentInfo = ObjCreate("Microsoft.Update.AgentInfo")    $AgentVer = $AgentInfo.GetInfo("ProductVersionString")  $ar_agent = StringSplit($AgentVer,".")      $ar_update = StringSplit("5.8.0.2694",".")  For $i = 1 to 4 Step 1      if(Int($ar_agent[$i]) < Int($ar_update[$i])) then return 1 ; Agent required - need newer version        if(Int($ar_agent[$i]) > Int($ar_update[$i])) then return -1 ; Agent not needed you have newer version   Next    return 0EndFuncFunc ConvertDate($date)  $year = StringMid($date,1,4)        $month = StringMid($date,5,2)   $day = StringMid($date,7,2) $hour = StringMid($date,9,2)    $min = StringMid($date,11,2)    $sec = StringMid($date,13,2)    return $month&"-"&$day&"-"&$year&" "&$hour&":"&$min&":"&$secEndFuncFunc Net_View()    Local $s_Buf = '', $a_Buf, $i_Pid = Run(@ComSpec & ' /c net view', '', @SW_HIDE, 2 + 4)    While Not @error        $s_Buf &= StdoutRead($i_Pid)    WEnd    $a_Buf = StringRegExp ($s_Buf, "\\\\([0-9a-zA-Z-]*)", 3)    ProcessClose($i_Pid)    Return $a_BufEndFunc Func _ComputerGetEventLog(ByRef $aEventLogInfo, $LogFile = "Application") Local $colItems, $objWMIService, $objItem   Dim $aEventLogInfo[1][9], $i = 1        $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2")   $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NTLogEvent Where Logfile = '"&$LogFile&"' and Type='Error' and SourceName='MSSQLSERVER'", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)       If IsObj($colItems) Then        For $objItem In $colItems           ReDim $aEventLogInfo[UBound($aEventLogInfo) + 1][9]         $aEventLogInfo[$i][0]  = $objItem.RecordNumber          $aEventLogInfo[$i][1]  = $objItem.ComputerName          $aEventLogInfo[$i][2]  = $objItem.EventCode         $aEventLogInfo[$i][3]  = $objItem.Message           $aEventLogInfo[$i][4]  = $objItem.Category          $aEventLogInfo[$i][5]  = $objItem.SourceName            $aEventLogInfo[$i][6]  = $objItem.TimeWritten           $aEventLogInfo[$i][7]  = $objItem.Type          $aEventLogInfo[$i][8]  = $objItem.User          $i += 1     Next        $aEventLogInfo[0][0] = UBound($aEventLogInfo) - 1       If $aEventLogInfo[0][0] < 1 Then            SetError(1, 1, 0)       EndIf   Else        SetError(1, 2, 0)   EndIfEndFuncFunc _RetFirst($aArray); return first item in an array    If IsArray($aArray) Then        Return $aArray[1]    EndIfEndFunc#endregion

@blackdove

Is that the only function the only one that has some OS differences?

I am glad to see some new and active interest in my project. I will look into adding the environment variables, and system drivers. There are a ton of other things to add as well. :-)

@melkortheevil

Yes you have to have admin rights. I am glad you have figured that out.

Is there any special time at which this error occurs?

JS

Link to comment
Share on other sites

  • 1 month later...

The GetMonitor function is getting the first monitor info but the remaining ones (for systems with multiple monitors) all return back blank entries for dimensions.

Availability code 3 for the first, 8 for the rest.

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Link to comment
Share on other sites

  • 6 months later...

Hello All,

Sorry for not having developed on this much further. I have many designs in my mind about this, and how we can further the WMI scripting to not just return information, but set it as well.

@FeReNGi

I have created the library in such a way that it won't be any trouble to put it into the main line of includes. I don't believe it's quite ready for that yet. However, if enough people would like to see it in the includes, then I will strive towards this before which time I continue development on it.

@sshrum

If you could debug it further that would be great. I don't have multiple monitors to test on. I would greatly appreciate any further information you provide.

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

The GetMonitor function is getting the first monitor info but the remaining ones (for systems with multiple monitors) all return back blank entries for dimensions.

Availability code 3 for the first, 8 for the rest.

Same for the graphics section ..

how to detect if the displayadapter has two outputs... first output is ok ... second the same as the display

Best regards,Emiel Wieldraaijer

Link to comment
Share on other sites

  • 1 month later...

this is awesome!

hopefully it will become available for the next release of autoit.

anyway to support remote computer query? so long as you have admin access on that machine or its part of the domain, should be able to get this info right?

thanks for making this available to us

Link to comment
Share on other sites

  • 2 months later...

Nice UDF :-)

But with the _ComputerGetBIOS() I don't get the information I search for.

If I try the Bios-Agent Bios Agent, I got the following information. There are exactly the same I can read if I turn on the computer:

BIOS ID: 01/29/2003-i845-W627HF-xxxxxxxx-00-None

BIOS OEM: W6399M7 V1.14 012903 10:30:00 MEDIONPC - 6.00 PG

Chipset: Unknown

SuperIO: Unknown

Manufacturer: MEDIONPC

Motherboard: MS-6399

If I use _ComputerGetBIOS, I got these:

Name : Award Modular BIOS v6.00PG

Status : OK

BIOS Characteristics : 4

BIOS Version : MSISYS - 42302e31

Description : Award Modular BIOS v6.00PG

Build Number :

Code Set :

Current Language : n|US|iso8859-1

Identification Code :

Installable Languages : 3

Language Edition :

List Of Languages : n|US|iso8859-1

Manufacturer : Award Software International, Inc.

Other Target OS :

Primary BIOS : -1

Release Date : 01/29/2003 00:00:00

Serial Number :

SM BIOS BIOS Version : 6.00 PG

SM BIOS Major Version : 2

SM BIOS Minor Version : 3

SM BIOS Present : -1

Software Element ID : Award Modular BIOS v6.00PG

Software Element State: 3

Target Operating Syste: 0

Version : MSISYS - 42302e31

I tried the _ComputerGetMotherboard() too, but it doesn't helps. How I can get the information like the Bios-Agent (without Chipset and SuperIO)?

Many thanks!

skyteddy

Edited by skyteddy
Link to comment
Share on other sites

  • 3 months later...

I've modified your UDF for my own personal, I thought I'd share.

  • objWMIService is registered globally, instead of per function. Possible speed increase.
  • Byref Parameters have been removed. use @Error and IsArray() to validate success.
  • Some more error checking
  • Added _ComputerGetInit, and _ComputerGetEnd functions

Example:

#include <Array.au3>
#include "CompInfo.au3"

_ComputerGetInit() ; calling this is optional (will be called if the wmi obj is not already in memory)

$av = _ComputerGetBootConfig()
_ArrayDisplay($av)

$av = _ComputerGetDependantServices()
_ArrayDisplay($av)

_ComputerGetEnd() ; remove the wmi object from memory

Download: CompInfo.au3

Edited by mrRevoked
Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
Link to comment
Share on other sites

  • 3 months later...

Hopefully this great udf is still "supported" even though this thread is pretty old. I have two monitors and I need to know the display size (in pixels) of each one. I checked out the UDF sample program and it DOES give me the size of my first monitor but it only sees one of the two monitors. Anyone know why this would be? Is there another way to get what I want?

Link to comment
Share on other sites

  • 2 weeks later...

Ladies & Gentlemen,

I would like to let all of you know I greatly appreciate all the support and comments. Sometimes this thread gets outside of my subscribed threads so I am sorry for the delayed response to some of the posts.

I don't have multiple monitors at the moment though I do have an extra at the house I may be able to hook up and see if I can get something figured out on the duality of it all. Unfortunately so far I have only delved into the WMI objects available.

I do plan on this being included into the AutoIt UDF's at some point, but I don't feel the library is up to that standard yet. I have coded it with that in mind however.

@Kastout

Your improvements sound quite useful. I will incorporate them soon. Thanks for giving back to the community!

Thanks all,

Jarvis

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • 1 month later...

Changed_ComputerGetStartup to include more information. Updated _ComputerGetStartup with documentation and error checking.

If anyone knows how to work with COM errors please let me know. I need some help in that area. With me converting most of these _ComputerGet*Info* UDF's to WMI script I need some COM Error checking. I need to learn this anyways so anyone that is willing to help me learn about COM Error checking please let me know.

JS

I could really use a UDF like this one here. Would anyone happen to know of a current similar project? Please and thanks.

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org
Link to comment
Share on other sites

  • 2 weeks later...

I could really use a UDF like this one here. Would anyone happen to know of a current similar project? Please and thanks.

Hello Avery,

If you look in the first post, it contains all the source necessary to work with. If you're looking for a function that isn't there, then please request it, and I will see what I can do to get it added in. I haven't actively worked on this project in a while, but the code should still work flawlessly (I hope :)).

Regards,

Jarvis

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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