tatsudoshi
17th November 2004 21:50 UTC
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.
Afrow UK
17th November 2004 22:04 UTC
You would have to store a value in the registry using WriteRegStr ... $STARTMENU_FOLDER then ReadRegStr $STARTMENU_FOLDER ... in the uninstall section.
-Stu
tatsudoshi
17th November 2004 22:09 UTC
Okay.. I thourght that stuff was parsed to the uninstaller at compile time so that it could find it, itself. Thank you :)
Afrow UK
17th November 2004 22:16 UTC
That would be impossible as the value would be changed on run-time not on compile-time.
-Stu
tatsudoshi
17th November 2004 22:20 UTC
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..
Afrow UK
18th November 2004 17:37 UTC
See ReadRegKey in the manual.
-Stu