Archive: Mui_startmenupage_registry


Mui_startmenupage_registry
[CODE]
.
.
.
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\zedas"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
!define MUI_STARTMENUPAGE_DEFAULT_FOLDER 'zedas'
.
.
.
InstallDirRegKey HKLM 'Software\zedas' Path
.
.
.
!define MUI_PAGE_HEADER_TEXT 'STARTMENU-headertext'
!define MUI_PAGE_HEADER_SUBTEXT 'STARTMENU-subtext'
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
.
.
.
Section 'bla' bla
WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
SectionEnd
[CODE]
this is my Definitition, but he dont insert the Entry "Startmenugrouop", he only adds the Path. Is there something, i have forgotten or maked wrong?


What does the compiler log say?
Does it claim about $StartMenuGroup?
Have you declared the variable $StartMenuGroup?


yes StartMenuGroup is declared and the compiler says nothing. i can compile and test it, but no entry will be writen. All other entry are writen, but only this one, which will be written by the Page, is not written.


If you're facing difficulties with this, I'd suggest copy/paste the code from the included example StartMenu.nsi.


i test it with the original example, by using copy and past from NSIS\Examples\UltraModernUI\StartMenu.nsi, and ther is no entry in the registry.

no error with the compiler, i dont konw what is wrong.

edit:


Var STARTMENU_FOLDER
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\UltraModernUI Test"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"

!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER


i changed only the Rootkey from HKCU to HKLM

What about the part within the section:

!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
...
...
!insertmacro MUI_STARTMENU_WRITE_END


you mean this?


!insertmacro MUI_STARTMENU_WRITE_BEGIN Application

;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"

!insertmacro MUI_STARTMENU_WRITE_END


my shortcuts are defined in sections, but i dont understand.
the shortcut is the reason that the entry is not written in my registry?

by the way, in the example "Neo Mule" from a User on Sorceforge, he hasn't use
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application !insertmacro MUI_STARTMENU_WRITE_END

abd the entrys are written in the registry.