Thread: Registry plugin
View Single Post
Old 22nd November 2017, 19:42   #221
Junior Member
Join Date: Nov 2017
Posts: 2
Hi guys,
I'm very new in NSIS and I'm trying to find a string in the windows registry that identifies my application, but I'm facing problems with win32 and win64.
In my pc (Win10 64bits) I have the following registries:
Computador\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QUANT MetaTrader 5
Computador\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QUANT MetaTrader 5 TRIAL
Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MetaTrader 5
Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MetaTrader 5 Terminal
Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MetaTrader XP
Computador\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\QUANT MetaTrader 5 TRIAL

I'm using this function to find the regs:
* APP_NAME_MT5 = "Metatrader"

Function SearchValueReg
Var /GLOBAL schHandle
Var /GLOBAL schPath
Var /GLOBAL schValue
Var /GLOBAL schString
Var /GLOBAL schType
Var /GLOBAL insFullPath
Var /GLOBAL insPath

SetRegView 32
${registry::Open} "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" "/K=0 /V=1 /S=0 /B=1 /NI=${APP_NAME_MT5}" $schHandle

${registry::Find} "$schHandle" $schPath $schValue $schString $schType
${If} $schType != ""
MessageBox MB_OK "$schValue"
${LoopUntil} $schType == ""

${registry::Close} "$srcHandle"


if I use SetRegView 32, I got 2 registries.
But, if I use SetRegView 64, I got nothing.

What I'm doing wrong?

Thanks in advance.
GustavoHennemann is offline   Reply With Quote