View Single Post
Old 31st March 2014, 17:59   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,277
When creating a shortcut it is important that the target and the .ico exists before you create the shortcut.

The second issue sounds like a permission issue.

Quote:
InstallDir "$ProgramFiles\MyApp"

Section
SetShellVarContext all
SetOutPath $instdir
File MyApp.jar
File MyApp.ico
CreateShortcut "$smprograms\myapp.lnk" "c:\whatever\java.exe" '-jar "$instdir\MyApp.jar"' "$instdir\MyApp.ico" 0
SectionEnd

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote