Archive: Startmenu Items creation


Startmenu Items creation
Dear All
I'm new to NSIS and has been using it from the past one week.
I encountered a problem while installing the software created using NSIS.
As you know $SMPROGRAMS is the variable containing path to StartMenu\All Programs folder.
My code is somewhat like this

CreateDirectory "$SMPROGRAMS\TestProject"
CreateShortCut "$SMPROGRAMS\TestProject\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\TestProject\TestProject.lnk" "$INSTDIR\TestProject.exe" "" "$INSTDIR\TestProject.exe" 0
While installing the application, if the user selects the default directory which is StartMenu\All Programs, there isn't any problem. But when he/she selects some other directory like StartMenu\All Programs\Accessories, the script is unable to get the complete path, it still remains StartMenu\All Programs. Is there any way to get the select path

For example $INSTDIR, by default contains C:\program files, but when the user selects a different path, $INSTDIR will be changed to the selected path.


Regards
Sunil Kumar B M

Are you using the start menu page? If so then obviously you don't use the $SMPROGRAMS constant (it's called a constant for a reason). The examples show you how to use your own variable.

Stu