Jump to content

Collect Uninstall Keys (App)


psyCodez
 Share

Recommended Posts

I've been messing around in AutoIt for a couple years now, but never visited the forum or learned any formal techniques for creating AutoIt apps.
 

I'm really interested in constructive criticism and any other useful information the AutoIt community is willing to provide. :-)

This application aggregates the information available through the registry's uninstall keys.

Features:

  • Connect to the registry of a remote computer.
  • Collectively view uninstall keys at-a-glance.
  • Filter results by name, manufacturer, GUID, or OS architecture.
  • Copy an application's attribute(s) to the clipboard.
  • Jump to an application's install location, install source, or registry uninstall key.
  • Uninstall an application.
  • Export results to a CSV file.

 

Screenshots:

  • 6hsQoVL.png
  • uUxeC4J.png
  • VlQXrOZ.png

 

Download:

https://drive.google.com/folderview?id=0B2Z9BWTswevBeTFuNTF4Ny03MDg&usp=sharing

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <Constants.au3>
#include <Date.au3>
#include <String.au3>

GUI()

Exit(0)

Func GUI()
    Global $nameCol     = 0
    Global $verCol      = 1
    Global $pubCol      = 2
    Global $archCol     = 3
    Global $msiCol      = 4
    Global $guidCol     = 5
    Global $uninstCol   = 6
    Global $dateCol     = 7
    Global $locCol      = 8
    Global $srcCol      = 9
    Global $keyCol      = 10

    Global $computer = ""
    Global $osArch = ""

    Global $GUI = GUICreate("Collect Uninstall Keys", 1000, 500, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SYSMENU, $WS_SIZEBOX, $WS_CAPTION), BitOR($WS_EX_STATICEDGE,$WS_EX_WINDOWEDGE))

    Global $iComp    = GUICtrlCreateInput("", 10, 9, 100, 21)
    Global $bConnect = GUICtrlCreateButton("Connect", 115, 5, 50, 28)
    Global $iSrch    = GUICtrlCreateInput("", 177, 9, 100, 21)
    Global $bFilter  = GUICtrlCreateButton("Filter", 283, 5, 50, 28)
    Global $cHideMSUpdates = GUICtrlCreateCheckbox("Hide Microsoft Updates", 352, 10, 137, 20)
    Global $rAll     = GUICtrlCreateRadio("All", 505, 10, 35, 20)
    Global $r32      = GUICtrlCreateRadio("x86", 540, 10, 35, 20)
    Global $r64      = GUICtrlCreateRadio("x64", 580, 10, 35, 20)
    Global $bExport  = GUICtrlCreateButton("Export to CSV", 883, 5, 90, 28)
    GUICtrlSetState($cHideMSUpdates, $GUI_CHECKED)
    GUICtrlSetState($rAll, $GUI_CHECKED)

    If $CmdLine[0] > 0 And $CmdLine[0] < 3 Then
        If $CmdLine[0] == 2 Then
            GUICtrlSetData($iSrch, $CmdLine[1])
            GUICtrlSetData($iComp, $CmdLine[2])
        Else
            GUICtrlSetData($iSrch, $CmdLine[1])
        EndIf
    EndIf

    Global $lResults = GUICtrlCreateLabel("", 8, 485, 500, 20)

    Global $ListView = GUICtrlCreateListView("", 0, 38, 1000, 445, -1, BitOR($LVS_EX_GRIDLINES,$LVS_EX_FULLROWSELECT,$WS_EX_CLIENTEDGE))

    _GUICtrlListView_AddColumn($ListView, "Name", 170)
    _GUICtrlListView_AddColumn($ListView, "Version", 65)
    _GUICtrlListView_AddColumn($ListView, "Publisher", 105)
    _GUICtrlListView_AddColumn($ListView, "Arch", 40, 2)
    _GUICtrlListView_AddColumn($ListView, "MSI", 35, 2)
    _GUICtrlListView_AddColumn($ListView, "GUID", 85)
    _GUICtrlListView_AddColumn($ListView, "Uninstall String", 95)
    _GUICtrlListView_AddColumn($ListView, "Install Date", 70)
    _GUICtrlListView_AddColumn($ListView, "Install Location", 100)
    _GUICtrlListView_AddColumn($ListView, "Install Source", 85)
    _GUICtrlListView_AddColumn($ListView, "Uninstall Key", 125)

    Global $rcMenu          = GUICtrlCreateContextMenu($ListView)
    Global $rcCopy          = GUICtrlCreateMenu("Copy", $rcMenu)
    Global $rcCopyLine      = GUICtrlCreateMenuItem("Line", $rcCopy)
    Global $rcCopyName      = GUICtrlCreateMenuItem("Name", $rcCopy)
    Global $rcCopyVer       = GUICtrlCreateMenuItem("Version", $rcCopy)
    Global $rcCopyPub       = GUICtrlCreateMenuItem("Publisher", $rcCopy)
    Global $rcCopyGUID      = GUICtrlCreateMenuItem("GUID", $rcCopy)
    Global $rcCopyUninst    = GUICtrlCreateMenuItem("Uninstall String", $rcCopy)
    Global $rcCopyLoc       = GUICtrlCreateMenuItem("Install Location", $rcCopy)
    Global $rcCopySrc       = GUICtrlCreateMenuItem("Install Source", $rcCopy)
    Global $rcCopyKey       = GUICtrlCreateMenuItem("Uninstall Key", $rcCopy)

    Global $rcJump      = GUICtrlCreateMenu("Jump to", $rcMenu)
    Global $rcJumpLoc   = GUICtrlCreateMenuItem("Install Location", $rcJump)
    Global $rcJumpSrc   = GUICtrlCreateMenuItem("Install Source", $rcJump)
    Global $rcJumpKey   = GUICtrlCreateMenuItem("Uninstall Key", $rcJump)

    Global $rcUninstall = GUICtrlCreateMenuItem("Uninstall", $rcMenu)

    Global $rcCancel = 0

    _GUICtrlListView_RegisterSortCallBack($ListView)

    GUISetState(@SW_SHOW)

    FillListView()

    While 1
        ReadGUI(GUIGetMsg())
    WEnd
EndFunc

Func FillListView()
    Local $i = 0, $c = 0
    Local $key = "", $value = "", $name = ""

    Local $regRoot = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
    Local $regRoot32 = "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
    Local $regArch = "HKLM64\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"

    $computer = GUICtrlRead($iComp)
    Local $srchTrm  = GUICtrlRead($iSrch)

    ToggleControlAvailability(0)

    _GUICtrlListView_DeleteAllItems($ListView)
    _GUICtrlListView_BeginUpdate($ListView)

    Local $pingErr = 0
    If $computer <> "" And StringCompare($computer, @ComputerName) <> 0 And StringCompare($computer, "localhost") <> 0 And $computer <> "127.0.0.1" Then
        $regRoot    = "\\" & $computer & "\" & $regRoot
        $regRoot32  = "\\" & $computer & "\" & $regRoot32
        $regArch    = "\\" & $computer & "\" & $regArch
        GUICtrlSetData($lResults, "Connecting to " & $computer & "...")
        Ping($computer, 1000)
        $pingErr = @error
    Else
        GUICtrlSetData($lResults, "")
    EndIf

    Local $dataBlob = ""

    ToggleRcMenus(1)

    If $pingErr <> 0 Then
        GUICtrlSetData($lResults, "Unable to connect to " & $computer & ".")
    Else
        $osArch = StringUpper(RegRead($regArch, "PROCESSOR_ARCHITECTURE"))

        If $osArch == "AMD64" And GUICtrlRead($r32) == $GUI_CHECKED Then
            $regRoot = $regRoot32
        ElseIf $osArch <> "AMD64" And GUICtrlRead($r64) == $GUI_CHECKED Then
            GUICtrlSetState($rAll, $GUI_CHECKED)
        EndIf

        GUICtrlSetData($lResults, "Searching...")
        Local $hideUpdates = 0
        If GUICtrlRead($cHideMSUpdates) == $GUI_CHECKED Then
            $hideUpdates = 1
        EndIf

        While 1
            If ReadGUI(GUIGetMsg($GUI)) == False Then
                GUICtrlSetData($lResults, $c & " results found (Search cancelled)")
                ExitLoop
            EndIf
            $i += 1
            $key = $regRoot & "\" & RegEnumKey($regRoot, $i)
            Switch @error
                Case 0
                    $name = RegRead($key, "DisplayName")
                    If @error == 0 Then Local $pub = RegRead($key, "Publisher")
                    If @error == 0 Then Local $uninst = RegRead($key, "UninstallString")
                    If $name <> "" And ($srchTrm == "" Or StringInStr($name, $srchTrm, 0, 1) Or StringInStr($pub, $srchTrm, 0, 1) Or StringInStr($uninst, $srchTrm, 0, -1)) Then
                        If $hideUpdates Then
                            If Not (StringInStr($pub, "Microsoft", 0, 1) And (StringInStr($name, "Update", 0, 1) Or StringInStr($name, "Hotfix", 0, 1))) Then
                                $dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
                                If $computer <> "" Then AddListEntry($computer, $dataBlob)
                                $c += 1
                            EndIf
                        Else
                            $dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
                            If $computer <> "" Then AddListEntry($computer, $dataBlob)
                            $c += 1
                        EndIf
                    EndIf
                Case -1
                    If $osArch == "AMD64" And $regRoot <> $regRoot32 And GUICtrlRead($r64) <> $GUI_CHECKED Then
                        $regRoot = $regRoot32
                        $i = 0
                    Else
                        GUICtrlSetData($lResults, $c & " result(s) found")
                        ExitLoop
                    EndIf
                Case 3
                    GUICtrlSetData($lResults, "Unable to connect to remote registry.")
                    ExitLoop
            EndSwitch
        WEnd
    EndIf

    If $computer == "" Then
        $dataBlob = StringStripWS($dataBlob, $STR_STRIPTRAILING)
        Local $lines = StringSplit($dataBlob, @CRLF, $STR_ENTIRESPLIT + $STR_NOCOUNT)
        If $dataBlob <> "" Then
            _ArraySort($lines)
            Local $listArray[UBound($lines)][_GUICtrlListView_GetColumnCount($ListView)]
            For $i = 0 To UBound($lines)-1
                Local $temp = StringSplit($lines[$i], "|", $STR_NOCOUNT)
                For $j = 0 To UBound($temp)-1
                    $listArray[$i][$j] = $temp[$j]
                Next
            Next
            _GUICtrlListView_DeleteAllItems($ListView)
            _GUICtrlListView_AddArray($ListView, $listArray)
            _GUICtrlListView_SetColumnWidth($ListView, 0, 170)
        EndIf
    Else
        Local $sortSense = False
        _GUICtrlListView_SimpleSort($ListView, $sortSense, 0)
    EndIf

    _GUICtrlListView_EndUpdate($ListView)

    ToggleRcMenus(0)

    ToggleControlAvailability(1)
EndFunc

Func ToggleRcMenus($inProgress)
    If $inProgress Then
        GUICtrlDelete($rcMenu)
        $rcMenu     = GUICtrlCreateContextMenu($ListView)
        $rcCancel    = GUICtrlCreateMenuItem("Cancel Search", $rcMenu)
    Else
        GUICtrlDelete($rcMenu)
        $rcMenu         = GUICtrlCreateContextMenu($ListView)
        $rcCopy         = GUICtrlCreateMenu("Copy", $rcMenu)
        $rcCopyLine     = GUICtrlCreateMenuItem("Line", $rcCopy)
        $rcCopyName     = GUICtrlCreateMenuItem("Name", $rcCopy)
        $rcCopyVer      = GUICtrlCreateMenuItem("Version", $rcCopy)
        $rcCopyPub      = GUICtrlCreateMenuItem("Publisher", $rcCopy)
        $rcCopyGUID     = GUICtrlCreateMenuItem("GUID", $rcCopy)
        $rcCopyUninst   = GUICtrlCreateMenuItem("Uninstall String", $rcCopy)
        $rcCopyLoc      = GUICtrlCreateMenuItem("Install Location", $rcCopy)
        $rcCopySrc      = GUICtrlCreateMenuItem("Install Source", $rcCopy)
        $rcCopyKey      = GUICtrlCreateMenuItem("Uninstall Key", $rcCopy)
        $rcJump         = GUICtrlCreateMenu("Jump to", $rcMenu)
        $rcJumpLoc      = GUICtrlCreateMenuItem("Install Location", $rcJump)
        $rcJumpSrc      = GUICtrlCreateMenuItem("Install Source", $rcJump)
        $rcJumpKey      = GUICtrlCreateMenuItem("Uninstall Key", $rcJump)
        $rcUninstall    = GUICtrlCreateMenuItem("Uninstall", $rcMenu)
    EndIf
EndFunc

Func ToggleControlAvailability($enable)
    If $enable Then
        GUICtrlSetState($iComp, $GUI_ENABLE)
        GUICtrlSetState($iSrch, $GUI_ENABLE)
        GUICtrlSetState($bConnect, $GUI_ENABLE)
        GUICtrlSetState($bFilter, $GUI_ENABLE)
        GUICtrlSetState($cHideMSUpdates, $GUI_ENABLE)
        GUICtrlSetState($rAll, $GUI_ENABLE)
        GUICtrlSetState($r32, $GUI_ENABLE)
        GUICtrlSetState($r64, $GUI_ENABLE)
        GUICtrlSetState($bExport, $GUI_ENABLE)
    Else
        GUICtrlSetState($iComp, $GUI_DISABLE)
        GUICtrlSetState($iSrch, $GUI_DISABLE)
        GUICtrlSetState($bConnect, $GUI_DISABLE)
        GUICtrlSetState($bFilter, $GUI_DISABLE)
        GUICtrlSetState($cHideMSUpdates, $GUI_DISABLE)
        GUICtrlSetState($rAll, $GUI_DISABLE)
        GUICtrlSetState($r32, $GUI_DISABLE)
        GUICtrlSetState($r64, $GUI_DISABLE)
        GUICtrlSetState($bExport, $GUI_DISABLE)
    EndIf
EndFunc

Func ReadGUI($guiMsg)
    Switch $guiMsg
        Case $bConnect
            FillListView()
        Case $bFilter
            FillListView()
        Case $rAll To $r64
            FillListView()
        Case $cHideMSUpdates
            FillListView()
        Case $bExport
            ExportCSV()
        Case $ListView
            _GUICtrlListView_SortItems($ListView, GUICtrlGetState($ListView))
        Case $rcCopyLine
            ClipPut(_GUICtrlListView_GetItemTextString($ListView, -1))
        Case $rcCopyName
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $nameCol))
        Case $rcCopyVer
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $verCol))
        Case $rcCopyPub
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $pubCol))
        Case $rcCopyGUID
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $guidCol))
        Case $rcCopyUninst
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $uninstCol))
        Case $rcCopyLoc
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $locCol))
        Case $rcCopySrc
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $srcCol))
        Case $rcCopyKey
            ClipPut(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $keyCol))
        Case $rcJumpLoc
            JumpToDir(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $locCol))
        Case $rcJumpSrc
            JumpToDir(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $srcCol))
        Case $rcJumpKey
            If $computer <> "" Then
                MsgBox($MB_ICONWARNING, "", "Jumping to remote registry not supported.", 10)
            Else
                Local $file = ""
                If $osArch == "AMD64" Then
                    FileInstall("C:\DRIVE\APPS\REGSCANNER\regscanner_x64.exe", @TempDir & "\", 0)
                    $file = "regscanner_x64.exe"
                Else
                    FileInstall("C:\DRIVE\APPS\REGSCANNER\regscanner.exe", @TempDir & "\", 0)
                    $file = "regscanner.exe"
                EndIf
                Local $key = ExpandKey(_GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $keyCol))
                Run(@TempDir & "\" & $file & " /regedit """ & $key & """")
            EndIf
        Case $rcUninstall
            If $computer <> "" Then
                MsgBox($MB_ICONWARNING, "", "Remote uninstall not supported.", 10)
            Else
                Local $ans = MsgBox($MB_ICONQUESTION + $MB_YESNO + $MB_DEFBUTTON2, "", "Uninstall """ & _GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $nameCol) & """", 10)
                If $ans == $IDYES Then
                    Local $uninstallStr = _GUICtrlListView_GetItemText($ListView, Int(_GUICtrlListView_GetSelectedIndices($ListView),1), $uninstCol)
                    RunWait($uninstallStr)
                    FillListView()
                EndIf
            EndIf
        Case $rcCancel
            Return False ; Stop search operation.
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    Return True ; Continue search operation.
EndFunc

Func JumpToDir($dir)
    If $computer <> "" And StringInStr($dir, ":\", 0, 1) Then
        $dir = StringReplace($dir, ":", "$", 1)
        $dir = "\\" & $computer & "\" & $dir
    EndIf
    If Not FileExists($dir) Then
        MsgBox($MB_ICONWARNING, "", "Unable to locate:" & @CRLF & @CRLF & $dir, 10)
    Else
        Run("explorer.exe """ & $dir & """", @SystemDir)
    EndIf
EndFunc

Func ExpandKey($key)
    If StringLeft($key, 4) == "HKLM" Then
        $key = StringReplace($key, "HKLM", "HKEY_LOCAL_MACHINE", 1)
    ElseIf StringLeft($key, 4) == "HKCU" Then
        $key = StringReplace($key, "HKCU", "HKEY_CURRENT_USER", 1)
    ElseIf StringLeft($key, 3) == "HKU" Then
        $key = StringReplace($key, "HKU",  "HKEY_USERS", 1)
    EndIf
    Return $key
EndFunc

Func AddListEntry($computer, ByRef $dataBlob)
    If $dataBlob <> "" Then
        $dataBlob = StringStripWS($dataBlob, $STR_STRIPTRAILING)
        Local $temp = StringSplit($dataBlob, "|", $STR_NOCOUNT)
        Local $lineArray[1][UBound($temp)]
        For $i = 0 To UBound($temp)-1
            $lineArray[0][$i] = $temp[$i]
        Next
        _GUICtrlListView_AddArray($ListView, $lineArray)
        $dataBlob = ""
    EndIf
EndFunc

Func BuildLine($ListView, $key, $name, $ver, $pub, $uninst, $date, $loc, $src)
    Local $guid, $msi, $arch, $temp

    If $date <> "" Then
        $date = _StringInsert($date, "/", 4)
        $date = _StringInsert($date, "/", 7)
        $date = _DateTimeFormat($date, 2)
    EndIf

    If StringInStr($uninst, "msiexec", 0) > 0 Then
        $temp = _StringBetween($uninst, "{", "}")
        $guid = "{" & $temp[0] & "}"
        $msi = "Y"
    Else
        $guid = ""
        $msi = "N"
    EndIf

    If $osArch == "AMD64" Then
        If StringInStr($key, "HKLM\SOFTWARE\WOW6432NODE") > 0 Then
            $arch = "x86"
        Else
            $key = StringReplace($key, "HKLM64", "HKLM", 1)
            $arch = "x64"
        EndIf
    Else
        $key = StringReplace($key, "HKLM64", "HKLM", 1)
        $arch = "x86"
    EndIf

    If $computer <> "" Then
        $key = StringReplace($key, "\\" & $computer & "\", "", 1, 0)
    EndIf

    Return $name & "|" & $ver & "|" & $pub & "|" & $arch & "|" & $msi & "|" & $guid & "|" & $uninst & "|" & $date & "|" & $loc & "|" & $src & "|" & $key & @CRLF
EndFunc

Func ExportCSV()
    Local $filePath = FileSaveDialog("Specify Output File", @DesktopDir, "Comma-Separated Value(*.csv)", $FD_PROMPTOVERWRITE)

    If @error == 0 Then
        $compare = StringCompare(StringRight($filePath, 4), ".csv", 0)
        If $compare <> 0 Then
            $filePath &= ".csv"
        EndIf

        Local $lvColCount = _GUICtrlListView_GetColumnCount($ListView) - 1
        Local $lvRowCount = _GUICtrlListView_GetItemCount($ListView) - 1
        Local $csvString = ""
        For $i = 0 To $lvRowCount
            For $j = 0 To $lvColCount
                $csvString &= '"' & StringReplace(_GUICtrlListView_GetItemText($ListView, $i, $j), '"', '"' & '"') & '"'
                If $j < $lvColCount Then $csvString &= ','
            Next
            If $i < $lvRowCount Then $csvString &= @CRLF
        Next
        Local $fileHandle = FileOpen($filePath, 10)
        If $fileHandle <> -1 Then
            Local $header = "Name,Version,Publisher,Arch,MSI,GUID,Uninstall String,Install Date,Install Source,Install Location,Uninstall Key"
            FileWrite($fileHandle, $header & @CRLF & StringStripWS($csvString, $STR_STRIPTRAILING))
            FileClose($fileHandle)
            MsgBox($MB_ICONINFORMATION, "", "Export successful.", 10)
        Else
            MsgBox(16, "", "Export unsuccessful.", 10)
        EndIf
    EndIf
EndFunc
Edited by psyCodez
Link to comment
Share on other sites

"C:\Users\Jayson\Downloads\CollectUninstallKeys.au3" (163) : ==> Variable used without being declared.:
$dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
$dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, ^ ERROR

Even the .exe can't start but I was looking for this!  :) thank for the great app!

 

Edited by Jayson
Link to comment
Share on other sites

Thanks for pointing that out!

I edited some code in the FillListView() function to alleviate the issue you were experiencing. Download it again and let me know if the issue persists.

Thanks!

After Edits:

$name = RegRead($key, "DisplayName")
If @error == 0 And $name <> "" Then
    $pub = RegRead($key, "Publisher")
    $uninst = RegRead($key, "UninstallString")
    If ($srchTrm == "" Or StringInStr($name, $srchTrm) Or StringInStr($pub, $srchTrm) Or StringInStr($uninst, $srchTrm)) Then
        If $hideUpdates Then
            If Not (StringInStr($pub, "Microsoft", 0, 1) And (StringInStr($name, "Update", 0, 1) Or StringInStr($name, "Hotfix", 0, 1))) Then
                $dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
                If $computer <> "" Then AddListEntry($computer, $dataBlob)
                $c += 1
            EndIf
        Else
            $dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
            If $computer <> "" Then AddListEntry($computer, $dataBlob)
            $c += 1
        EndIf
    EndIf
EndIf
 

Before Edits:

$name = RegRead($key, "DisplayName")
If @error == 0 Then Local $pub = RegRead($key, "Publisher")
If @error == 0 Then Local $uninst = RegRead($key, "UninstallString")
If $name <> "" And ($srchTrm == "" Or StringInStr($name, $srchTrm, 0, 1) Or StringInStr($pub, $srchTrm, 0, 1) Or StringInStr($uninst, $srchTrm, 0, -1)) Then
If $hideUpdates Then
If Not (StringInStr($pub, "Microsoft", 0, 1) And (StringInStr($name, "Update", 0, 1) Or StringInStr($name, "Hotfix", 0, 1))) Then
$dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
If $computer <> "" Then AddListEntry($computer, $dataBlob)
$c += 1
EndIf
Else
$dataBlob &= BuildLine($ListView, $key, $name, RegRead($key, "DisplayVersion"), $pub, $uninst, RegRead($key, "InstallDate"), RegRead($key, "InstallLocation"), RegRead($key, "InstallSource"))
If $computer <> "" Then AddListEntry($computer, $dataBlob)
$c += 1
EndIf
EndIf

 

Edited by psyCodez
Link to comment
Share on other sites

  • 7 months later...

Im getting an array error sometimes with an array out of bounds i think

Ill try and capture the error tommoz at work

It seems i get a machine every now and then that throws the error but most seem fine

from memory its line 10000+ so i guess its to do with an include but ill report back tommoz

EDIT heres the grab

post-60350-0-13598200-1410890032_thumb.p

Edited by Chimaera
Link to comment
Share on other sites

  • 4 years later...

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