Archive: Parsing a user input to uninstaller


Parsing a user input to uninstaller
Hi..

I want the user to tell the installer where to put the shortcuts and this works fine (it is snipped lines)

But my uninstaller deletes the hole startmenu! And I think it is because $STARTMENU_FOLDER = null to the uninstaller. So how do I tell the uninstaller where $STARTMENU_FOLDER is?

------------- CODE snip ------------
var STARTMENU_FOLDER
!insertmacro MUI_PAGE_STARTMENU Cuts $STARTMENU_FOLDER
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"

Section "Uninstall"
RMDir /r $INSTDIR
RMDir /r $SMPROGRAMS\$STARTMENU_FOLDER
SectionEnd
------------- CODE snip ------------

Or see the .nsi file for full insight.
Thanks for your time.


You would have to store a value in the registry using WriteRegStr ... $STARTMENU_FOLDER then ReadRegStr $STARTMENU_FOLDER ... in the uninstall section.

-Stu


Okay.. I thourght that stuff was parsed to the uninstaller at compile time so that it could find it, itself. Thank you :)


That would be impossible as the value would be changed on run-time not on compile-time.

-Stu


True true...

Do you know how to use:

!insertmacro MUI_STARTMENUPAGE_REGISTRY_ROOT
!insertmacro MUI_STARTMENUPAGE_REGISTRY_KEY
!insertmacro MUI_STARTMENUPAGE_REGISTRY_VALUENAME

I have never used these and I cannot get much help from the doc's..


See ReadRegKey in the manual.

-Stu