Archive: Mui_startmenupage


Mui_startmenupage
Well, I want to give ability for user to change that will be used for creating shortcuts in startmenu. I need to create shortcuts for all users, but can't make MUI_STARTMENUPAGE command or StartMenu plugin to display list with directories Startmenu for all users. How can I do this?


You have to make a startmenu link in the startmenu folder of all users? There are 2 questions on the way:
1. How do you know which is the startmenu folder of all users?
2. How do you tell NSIS to use this folder?

1.) The start menu folder of All Users is readable in the registry under
HKLM\SOFTWARE\Microsoft\Windows\Explorer\Shell Folders\Common Start Menu

2.) We can tell NSIS to use this startmenu folder by using the MUI_STARTMENUPAGE_DEFAULTFOLDER definition.

Lets put it together in some code (untested :rolleyes: ):



Push $0
ReadRegStr $0 HKLM "Software\Microsoft\Windows\Explorer\Shell Folders" "Common Start Menu"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER $0
Pop $0
!insertmacro MUI_PAGE_STARTMENU

To set variables such as $STARTMENU as the current user or for all users, use SetShellVarContext current / all

-Stu