简体   繁体   中英

Nsis Script : Reading from registry key value in NSIS script fails

I am creating my installer with multiple dependency in that, after my exe get install successfully it will go for re-install. But while reading from registry its giving nothing, still entry is present in registry. To debug this issue I am reading my registry entry its showing correct value. But when I am running again my exe it giving nothing.

"This problem is coming when I am installing my exe dependency then my exe. When dependency is already installed this problem is not coming. Please help me

code :

ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" 
StrCmp $R0 "" init.install

each time $R0 value is "", but in same path entry is present. Help me to debug this issue.

It may occur because NSIS reads from wow6432node on x64 OS. It reads from win32 view by default because NSIS installer is win32 process. SetRegView 64 may be called before reading in that case.

http://nsis.sourceforge.net/Reference/SetRegView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM