Old 23rd May 2012, 23:20   #1
puzzled
Junior Member
 
Join Date: May 2012
Posts: 2
Question 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.
puzzled is offline   Reply With Quote
Old 23rd May 2012, 23:27   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
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
Afrow UK is offline   Reply With Quote
Old 24th May 2012, 02:41   #3
puzzled
Junior Member
 
Join Date: May 2012
Posts: 2
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.
puzzled is offline   Reply With Quote
Old 24th May 2012, 03:22   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,590
SetRegView is a command and not an attribute/property (And most attributes are not shared with the uninstaller anyway)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
mui_startmenu_getfolder, readregstr

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump