pld32
18th April 2008 15:46 UTC
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.
kichik
18th April 2008 15:51 UTC
Does $INSTDIR\myapp exist?
pld32
18th April 2008 15:59 UTC
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.
kichik
18th April 2008 16:13 UTC
Do you have access to write there? Are you sure nothing deletes it later in the script?
pld32
18th April 2008 16:19 UTC
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.
kichik
18th April 2008 16:29 UTC
It's not Vista, is it?
pld32
18th April 2008 16:32 UTC
no xps sp2
kichik
18th April 2008 16:36 UTC
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.
pld32
18th April 2008 17:25 UTC
Thank you for your help. Sorry to have bothered u it was a stupid typo error. Just did not see it.