Tmort
14th February 2005 16:20 UTC
Createshortcut Problems
I'm trying to create a shortcut, particularly on the Desktop and specify an icon.
I have output set to "$INSTDIR" and this is where all the files a copied to including the icon file.
I've tried a few variations and I can get the code to compile but it doesn't create a shortcut when I run it.
The section of code is:
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
;File "..\..\path\to\file\mydb.mdb"
CreateDirectory "$SMPROGRAMS\mydb"
CreateShortCut "$SMPROGRAMS\mydb\mydb.lnk" "$INSTDIR\mydb.mdb" "mydb icon.ico"
CreateShortCut "$DESKTOP\mydb.lnk" "$INSTDIR\mydb.mdb" "mydb icon.ico"
Thanks in advance for the help
Afrow UK
14th February 2005 16:39 UTC
You use SetOutPath to set the 'Start in' path for shortcuts. You need to specify the full path to your icon:
"$INSTDIR\mydb icon.ico"
-Stu
Tmort
14th February 2005 21:14 UTC
I guess I don't get it.
I've tried:
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
;File "..\..\path\to\file\mydb.mdb"
CreateDirectory "$SMPROGRAMS\mydb"
;File "..\..\path\to\file\Example.file"
File "mydb.mdb"
File "mydb Icon.ico"
File "mydb_DATA.mdb"
SetOutPath "$instdir\mydb icon.ico"
CreateShortCut "$SMPROGRAMS\mydb\mydb.lnk" "$INSTDIR\mydb.mdb" "$instdir\mydb icon.ico"
CreateShortCut "$DESKTOP\iwcd.lnk" "$INSTDIR\mydb.mdb" "$instdir\mydb icon.ico"
SectionEnd
What am I missing?
Thanks
kichik
19th January 2007 13:57 UTC
The icon path is the fourth parameter. The third parameter is the command line parameters. Add an empty set of quotes between the mdb and the file and it should work.