When using SetShellVarContext all
the path $DESKTOP
resolves to might change if you had to elevate with UAC etc.
I assume you are not really installing the application .exe and other files on the users desktop? If you place the .exe and the .ico somewhere under $ProgramFiles
it should work...
InstallDir "$ProgramFiles\MyApp"
Section
SetShellVarContext all
SetOutPath "$InstDir"
File myapp.exe
File myapp.ico
CreateShortcut "$DESKTOP\myapp.lnk" "$InstDir\myapp.exe" "" "$InstDir\myapp.ico" 0
SectionEnd