Archive: Run an application using short cut folder in StartMenu in nsis?


Run an application using short cut folder in StartMenu in nsis?
How to start the my application using short cut in Start menu? I have tried following but could not started the application?


CreateShortcut "$STARTMENU\Programs\my application\my app.lnk" "$INSTDIR\setup.exe" "" "" 0

In my script i did not included setup.exe? After compiling only setup.exe file created.Is there need to copy this file? I dont know how to solve this?

Can anyone help me?


I'm not sure if I understand your question correctly, but if you want to create a shortcut to your installed application, the code should look something like this:
CreateShortCut "$SMPROGRAMS\My Company\My Program.lnk" "$INSTDIR\My Program.exe" "" "$INSTDIR\My Program.exe"

If you want to create a shortcut to the installer (why??), you could try:
CreateShortCut "$SMPROGRAMS\My Company\My Program Setup.lnk" "$EXEPATH" "" "$EXEPATH"
(Of course this assumes that the installer isn't renamed, deleted or moved after installation.)


CreateShortCut "$SMPROGRAMS\My Company\My Program Setup.lnk" "$EXEPATH" "" "$EXEPATH"

If i give it'll open the output directory.I need to run my application through this short cut menu?


You're still not clearly saying what you want to run: Your installer, or your application?


Thanks MSG.

I need to run my application through this shortcut option.No need to run the installer.


Then you shouldn't be bothering with $EXEPATH. Like I said, that's if you wanted to run the installer itself.