[英]NSIS read registry key returns empty for postgresql
using the NSIS example for read registry keys, I tried to read postgres registry keys but always returns empty, I verified that the path is correct but NSIS ReadRegStr shows empty with quotes, without quotes. 使用NSIS示例读取注册表项,我尝试读取postgres注册表项,但始终返回空,我验证了路径正确,但是NSIS ReadRegStr显示为带引号的空,不带引号。 ( The original example reads from Software\\Microsoft\\Windows\\CurrentVersion and it recovers the key,value correctly)
(原始示例从Software \\ Microsoft \\ Windows \\ CurrentVersion中读取,并且可以正确恢复键值)
loop1:
ClearErrors
EnumRegValue $1 HKLM "SOFTWARE\PostgreSQL\Installations\postgresql-x64-10" $0
IfErrors done
IntOp $0 $0 + 1
ReadRegStr $2 HKLM SOFTWARE\PostgreSQL\Installations\postgresql-x64-10 $1
MessageBox MB_YESNO|MB_ICONQUESTION "$1 = $2$\n$\nMore?" IDYES loop1
done:
any suggestion? 有什么建议吗? thanks
谢谢
64-bit versions of Windows has two registry views. Windows的64位版本具有两个注册表视图。
The registry redirector isolates 32-bit and 64-bit applications by providing separate logical views of certain portions of the registry on WOW64.
注册表重定向器通过在WOW64上提供注册表某些部分的单独逻辑视图来隔离32位和64位应用程序。 The registry redirector intercepts 32-bit and 64-bit registry calls to their respective logical registry views and maps them to the corresponding physical registry location.
注册表重定向器拦截对它们各自的逻辑注册表视图的32位和64位注册表调用,并将它们映射到相应的物理注册表位置。 The redirection process is transparent to the application.
重定向过程对应用程序是透明的。 Therefore, a 32-bit application can access registry data as if it were running on 32-bit Windows even if the data is stored in a different location on 64-bit Windows.
因此,即使32位应用程序存储在64位Windows上的其他位置,它也可以像在32位Windows上运行一样访问注册表数据。
Use SetRegView to read from the 64-bit view in NSIS: 使用SetRegView从NSIS中的64位视图中读取:
Section
SetRegView 64
ReadRegStr ...
SetRegView lastused
SectionEnd
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.