ilaiyaraja
20th November 2012 05:43 UTC
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?
T.Slappy
21st November 2012 05:50 UTC
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
Anders
21st November 2012 06:08 UTC
Batch files don't have embedded icons (clearly) but the shortcut should still work, it would just have the default unknown doctype icon.
ilaiyaraja
21st November 2012 06:46 UTC
what is the code .ico file for icon? can you share me?
MSG
21st November 2012 09:17 UTC
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.)