Archive: Shortcut issue


Shortcut issue
I'm trying to create a shortcut in my install folder based on my .exe

CreateShortCut "$INSTDIR\myapp\myapp.lnk" \
$INSTDIR\myapp.exe" \
"MC Data Backup" "" "" SW_SHOWNORMAL \
ALT|CTRL|SHIFT|F5 "myapp MC"

No shortcut is created. If I change "$INSTDIR\myapp\myapp.lnk"
to "$SMPROGRAMS\myapp\myapp.lnk" it works.


Does $INSTDIR\myapp exist?


SetOutPath "$INSTDIR"
SetOverwrite try
CreateDirectory "$SMPROGRAMS\iNetBackup"
CreateShortCut "$SMPROGRAMS\iNetBackup\iNetBackup.lnk" "$INSTDIR\iNetBackup.exe"
File /r /x *.ico "H:\iNetBackup Install\*.*"

I would say yes. This is the code prior to the shortcut command. when my setup.exe is completed every thing is fine except no shortcut.


Do you have access to write there? Are you sure nothing deletes it later in the script?


I have admin rights.
nothing gets deleted in my setup.exe until the uninstall is run but @ this time I'm not deleting the shortcut.


It's not Vista, is it?


no xps sp2


Check if the error flag is set using ClearErrors and IfErrors. Also try checking if the file exists right after it's created using IfFileExists. Maybe something else deletes it later down the road.


Thank you for your help. Sorry to have bothered u it was a stupid typo error. Just did not see it.