1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
Name "StartMenu.dll test"
OutFile "StartMenu Test.exe"
XPStyle on
Page directory
DirText "This installer will create some shortcuts to MakeNSIS in the start menu.$\nFor this it needs NSIS's path." \
"Please specify the path in which you have installed NSIS:"
InstallDir "${NSISDIR}"
Function .onVerifyInstDir
IfFileExists $INSTDIR\makensis.exe +2
Abort
FunctionEnd
Page custom StartMenuGroupSelect "" ": Start Menu Folder"
Function StartMenuGroupSelect
Push $R1
StartMenu::Select /checknoshortcuts "Don't create a start menu folder" /autoadd /lastused $R0 "StartMenu.dll test"
Pop $R1
StrCmp $R1 "success" success
StrCmp $R1 "cancel" done
; error
MessageBox MB_OK $R1
StrCpy $R0 "StartMenu.dll test" # use default
Return
success:
Pop $R0
done:
Pop $R1
FunctionEnd
Page instfiles
Section
# this part is only necessary if you used /checknoshortcuts
StrCpy $R1 $R0 1
StrCmp $R1 ">" skip
CreateDirectory $SMPROGRAMS\$R0
CreateShortcut $SMPROGRAMS\$R0\MakeNSISw.lnk $INSTDIR\makensisw.exe
SetShellVarContext All
CreateDirectory $SMPROGRAMS\$R0
CreateShortcut "$SMPROGRAMS\$R0\All users MakeNSISw.lnk" $INSTDIR\makensisw.exe
skip:
SectionEnd
|