#include <Array.au3>
#include <WinAPIEx.au3>
#include <APIConstants.au3>
Local $tData, $hKey, $aCount, $aApp[1][4] = [['DisplayName', 'DisplayVersion', 'InstallLocation', 'UninstallString']], $hSubKey, $iCount
$tData = DllStructCreate('wchar[1024]')
$hKey = _WinAPI_RegOpenKey($HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall');$HKEY_CURRENT_USER
$aCount = _WinAPI_RegQueryInfoKey($hKey)
ReDim $aApp[$aCount[0] + 1][4]
For $i = 0 To $aCount[0] - 1
$hSubKey = _WinAPI_RegOpenKey($hKey, _WinAPI_RegEnumKey($hKey, $i))
If _WinAPI_RegQueryValue($hSubKey, $aApp[0][0], $tData) Then
$iCount += 1
$aApp[$iCount][0] = DllStructGetData($tData, 1)
For $j = 1 To 3
If _WinAPI_RegQueryValue($hSubKey, $aApp[0][$j], $tData) Then $aApp[$iCount][$j] = DllStructGetData($tData, 1)
Next
EndIf
_WinAPI_RegCloseKey($hSubKey)
Next
_WinAPI_RegCloseKey($hKey)
If $iCount <> $aCount[0] Then ReDim $aApp[$iCount + 1][4]
_ArrayDisplay($aApp, $iCount)