Hello,
if You want read 32bit registry from 64bit, to use: "Wow6432Node" beetween $aKey a $bKey, like:
HKLMSOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall
allso read 64bit registry from 32bit app:
HKLM64SOFTWAREMicrosoftWindowsCurrentVersionUninstall
and my some script for example (works well on both)
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$search="{*}"
$aKey = "HKLM\SOFTWARE"
$bKey = "Microsoft\Windows\CurrentVersion\Uninstall\"
$timer=TimerInit()
$OsArch=StringRight(@OSArch, 2)
$script=86
If @AutoItX64 Then $script=64
If $script <> $OsArch Then
$aKey = StringRegExpReplace($aKey, "(\\)", "64\\", 1)
$AllValues=":X" & $OsArch & @CRLF & ReadValues($aKey & "\" & $bKey)
Else
$AllValues=":X" & $OsArch & @CRLF & ReadValues($aKey & "\" & $bKey)
EndIf
If $OsArch = 64 Then $AllValues&=@CRLF & ":X86" & @CRLF & ReadValues($aKey & "\Wow6432Node\" & $bKey)
Func ReadValues($hKey)
Local $instance=1, $var, $name, $Values
While 1
$subKey=RegEnumKey($hKey, $instance)
If @error Then ExitLoop
$instance+=1
$var = RegRead($hkey & $subKey, "UninstallString")
If Not $var Then ContinueLoop
$name = RegRead($hkey & $subKey, "DisplayName")
$Values&="Name: " & $name & "; String: " & $var & @CRLF & @CRLF
WEnd
Return $Values
EndFunc
$Values=""
$instance=StringRegExp($AllValues, "(?m)(.*{.*})$|(?m)(:...)$", 3)
For $w=0 To UBound($instance)-1
$Values&=$instance[$w] & @CRLF
Next
$instance=0
$AutoItVer=" AutoIt X" & $script & " Ver: " & @AutoItVersion & " (OsArch: X" & $OsArch & ")"
ConsoleWrite($AutoItVer & @CRLF & $AllValues & @CRLF)
MsgBox(0,"Time: " & TimerDiff($timer)/1000 & " s."," " & $AutoItVer & @CRLF & $Values & @CRLF)
Greetings.
P.S. sorry for my poor English