startmenu registry

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2065 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2003-01-15 12:39:34 +00:00
parent 8c204678d9
commit ab5472a5ae
3 changed files with 25 additions and 5 deletions

View file

@ -160,6 +160,11 @@ follow these steps:</p>
<p class="text"><span class="bold">MUI_STARTMENU_DEFAULTFOLDER</span><br />
The default Start Menu Folder. Use $(LANGSTRINGNAME) as value is you want
to use a language string.</p>
<p class="text"><span class="bold">MUI_STARTMENU_REGISTRY_ROOT, MUI_STARTMENU_REGISTRY_KEY,
MUI_STARTMENU_REGISTRY_VALUENAME</span><br />
If your installer saves the Start Menu folder of a previous installation
in a registry, define these values and the Modern UI will use the saved
value as default folder.</p>
</div>
<p class="text"><span class="bold">MUI_FINISHPAGE</span><br />
Show the Finish page.</p>

View file

@ -1066,11 +1066,27 @@
!ifndef MUI_STARTMENU_DEFAULTFOLDER
!define MUI_STARTMENU_DEFAULTFOLDER "${MUI_PRODUCT}"
!endif
Function "${SETSTARTMENU}"
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
!ifdef MUI_STARTMENU_REGISTRY_ROOT
!ifdef MUI_STARTMENU_REGISTRY_KEY
!ifdef MUI_STARTMENU_REGISTRY_VALUENAME
StrCmp "${MUI_STARTMENU_VARIABLE}" "" "" +6
Push ${MUI_TEMP1}
ReadRegStr ${MUI_TEMP1} "${MUI_STARTMENU_REGISTRY_ROOT}" "${MUI_STARTMENU_REGISTRY_KEY}" "${MUI_STARTMENU_REGISTRY_VALUENAME}"
StrCmp ${MUI_TEMP1} "" +2
StrCpy "${MUI_STARTMENU_VARIABLE}" ${MUI_TEMP1}
Pop ${MUI_TEMP1}
!endif
!endif
!endif
StartMenu::Select /noicon /autoadd /text "$(MUI_INNERTEXT_STARTMENU_TOP)" /lastused "${MUI_STARTMENU_VARIABLE}" /checknoshortcuts "$(MUI_INNERTEXT_STARTMENU_CHECKBOX)" "${MUI_STARTMENU_DEFAULTFOLDER}"
Pop "${MUI_STARTMENU_VARIABLE}"

View file

@ -10,10 +10,9 @@
;$9 is being used to store the Start Menu Folder.
;Do not use this variable in your script (or Push/Pop it)!
;You can change this variable or the default Start Menu Folder by using
;these defines:
;!define MUI_STARTMENU_VARIABLE "$VAR"
;!define MUI_STARTMENU_DEFAULTFOLDER "Folder Name"
;To change this variable, use MUI_STARTMENU_VARIABLE.
;Have a look at the Readme for info about other options (default folder,
;registry).
!define TEMP $R0