tieum
28th March 2006 09:55 UTC
Copying files
Hello,
I try to copy a file created on the desktop to the Start menu:
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
DetailPrint "Copy: $DESKTOP\$LINK_NAME.lnk $SMPROGRAMS\$ICONS_GROUP"
CopyFiles '"$DESKTOP\$LINK_NAME.lnk"' '"$SMPROGRAMS\$ICONS_GROUP"'
Output shows
Create folder: C:\Documents and Settings\All Users\Start Menu\Programs\MyProgram
Copy: C:\Documents and Settings\All Users\Desktop\MyLink.lnk C:\Documents and Settings\All Users\Start Menu\Programs\MyProgram
Copy to "C:\Documents and Settings\All Users\Start Menu\Programs\MyProgram"
Copy failed
After installation, I verified and "C:\Documents and Settings\All Users\Desktop\MyLink.lnk" exists
What's wrong here? Why the file did not copy?
Thanks,
Tieum
Afrow UK
28th March 2006 13:44 UTC
With CopyFiles you must specify the file name for the distination path as well as the folder.
-Stu
tieum
28th March 2006 15:33 UTC
1. I tried with
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
DetailPrint "Copy: $DESKTOP\$LINK_NAME.lnk $SMPROGRAMS\$ICONS_GROUP"
CopyFiles '"$DESKTOP\$LINK_NAME.lnk"' '"$SMPROGRAMS\$ICONS_GROUP\"$LINK_NAME.lnk'
and this does not work either
2. Doc example does not use filename
CreateDirectory $INSTDIR\backup
CopyFiles $INSTDIR\*.dat $INSTDIR\backup
Any other idea?
Thanks,
Tieum
Instructor
28th March 2006 16:06 UTC
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CopyFiles "$DESKTOP\$LINK_NAME.lnk" "$SMPROGRAMS\$ICONS_GROUP"
One quote
Afrow UK
28th March 2006 17:28 UTC
The documentation example you have posted does not specify the file name for the destination copy because the first parameter specifies any *.dat files rather than a single file to copy.
-Stu