Archive: How to create shortcut menu for batch file?


How to create shortcut menu for batch file?
I have written nsis script and successfully created exe file.In my project i have batch file and installed as service using nsis script.Now i want to create shortcut menu for that batch file to start and stop the application.I dont know how to create short cut menu for batch file.In my script i have installed in my batch file as windows services using following code,


Exec '$INSTDIR\batch.bat'


CreateShortCut '$SMPROGRAMS\My application\My application.lnk' '$INSTDIR\batch.bat' "" '$INSTDIR\batch.bat' 0

If i give this above my application again installed only not yet started.How to create shortcut menu for this batch file?


I do not see any reason why shortcut could not be created for .bat file.
Try using .ico file for icon, maybe Windows cannot extract icon #0 from .bat


Batch files don't have embedded icons (clearly) but the shortcut should still work, it would just have the default unknown doctype icon.


what is the code .ico file for icon? can you share me?


Originally posted by ilaiyaraja
what is the code .ico file for icon? can you share me?
It's all in the manual: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3.4
(Hint: the "icon.file" parameter.)