Skip to content
⌘ NSIS Forum Archive

A better posting on MUI_STARTMENUPAGE

3 posts

Angus Leeming#

A better posting on MUI_STARTMENUPAGE

Re-reading my post of yesterday, I see that I didn't express myself very clearly. I hope that I'll do better this time.

The attached, self contained, .nsi file fails to compile with this error:

!define: "MUI_STARTMENUPAGE_REGISTRY_ROOT"="$ProductRootKey"
!define: "MUI_STARTMENUPAGE_REGISTRY_KEY"="Software\Microsoft\Windows\CurrentVersion\Uninstall\LyX"
!define: "MUI_STARTMENUPAGE_REGISTRY_VALUENAME"="Start Menu Folder"
!insertmacro: MUI_PAGE_STARTMENU
Usage: ReadRegStr $(user_var: output) rootkey subkey entry
root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)
Error in macro MUI_FUNCTION_STARTMENUPAGE on macroline 10
Error in macro MUI_PAGE_STARTMENU on macroline 34

The reason for the error is clear enough; it doesn't like the variable $ProductRootKey. However, I would like to pass in either "HKLM" or "HKCU", depending on some previously set option. See the script.

Any ideas?
Angus
kichik#
Version 2.06 accepts SHCTX as a registry root key. It's replaced by HKLM or HKCU depending on SetShellVarContext.