Skip to content
⌘ NSIS Forum Archive

How to create shortcut menu for batch file?

5 posts

ilaiyaraja#

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#
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#
Batch files don't have embedded icons (clearly) but the shortcut should still work, it would just have the default unknown doctype icon.
MSG#
Originally Posted by ilaiyaraja View Post
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.)