Archive: Sorting start menu after installation is completed.


Sorting start menu after installation is completed.
Hi All

I add a folder named "SM_Folder" to start menu programs folder(SMPROGRAMS), where SM_Folder contains all my installed programs shortcut.

How NSIS to sort this "SM_Folder"(just this folder) after installation is completed.

Thx


In the Start menu list? Windows manages this.

-Stu


Thanks for your reply

I know it is managed by Windows and not NSIS ^_^

I post here because it is installation-related subject.

Maybe Shell API can do this because windows taskbar suppost this function ("sort by name").

Just discussion...


I think I found the answer !!

Delete corresponding key under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs

if existed before creating shortcut.


!define SM_Folder "My Start menu shortcut folder"

..........
..........

Section "My software"

..........
..........

; delete this key before creating shortcut
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs\${SM_Folder}"

; create shortcut now
CreateDirectory "$SMPROGRAMS\${SM_Folder}"
CreateShortCut "$SMPROGRAMS\${SM_Folder}\App1.lnk" "$INSTDIR\App1.exe"
CreateShortCut "$SMPROGRAMS\${SM_Folder}\App2.lnk" "$INSTDIR\App2.exe"

..........
..........

SectionEnd