Archive: Modern UI and "SetShellVarContext"


Modern UI and "SetShellVarContext"
I need/want to "force" (suggest) the Start Menu Programs / All using "SetShellVarContext" but don't know how to define this using the ModernUI interface.


The MUI uses (in the StartMenu.nsi example) $SMPROGRAMS, so SetShellVarContext works on it too. Just set it to all before you create the shortcuts.


Edit.
Like this:
Section -AdditionalIcons
!insertmacro MUI_STARTMENU_WRITE_BEGIN
SetShellVarContext all
;Create shortcuts
CreateDirectory "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\7-JG77 Home Page.url" "http://www.7jg77.com"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstall.lnk" "$PROGRAMFILES\${MUI_PRODUCT}\uninst.exe"

!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd


Yep, exactly.


::thud:: (falls out of chair)


Ok, great I've been wondering on that too!

But, what is the best way to let the user choose between
- All Users
- Current user only

Thanks,
Lilla


Use an InstallOptions page (see Modern UI Readme).


Will do, thanks.

Lilla