Archive: Registry Read Problems


Registry Read Problems
I'm setting a registry string during the NSIS installer process. I'm able to retrieve the registry string without a problem when I am in the install phase.

ReadRegStr $1 HKLM "${REGKEY}" "Start Menu Folder"

MessageBox MB_OK "Registry Start Menu folder: $1"

I attempt the same registry read in the uninstaller and it returns an error and an empty string.

ClearErrors
ReadRegStr $StartMenuFolder HKLM "${REGKEY}" "Start Menu Folder"
IfErrors Errors
MessageBox MB_OK "reg read startmenuFolder = $StartMenuFolder"
Goto MoveOn

Errors:
MessageBox MB_OK "reg read ERROR 1 = **$StartMenuFolder**"

I've also attempted to get this value out of:

!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder

This only returns the default value that was set. The user inputed value does not get returned.

Any suggestions?

Thanks.


Any chance you are trying to read from the Wow6432Node key when it's not under there (i.e. you have used SetRegView 64 in the installer but not the uninstaller).

Stu


Wow, that was exactly it. I thought that if I was setting it in the installer then it would carry over to the uninstaller. Thanks so much for the help. I've been trying to figure out this issue all day! Much appreciated, especially the quick response.


SetRegView is a command and not an attribute/property (And most attributes are not shared with the uninstaller anyway)