|
|
|
|
#1 |
|
Member
Join Date: Jun 2006
Posts: 71
|
CopyFile problems
I am having trouble copying files. I have looked at help from the NSIS User Manual and this forum but it looks like I am doing the right thing. Here is my code for it.
!define FileCopy CopyFiles "$INSTDIR\IWARN.bat" "$DESKTOP" |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
Seems your code should work. But, a few things you might look at:
- Does the user have the ability to write to the desktop? - Does the file "IWARN.BAT" exist in $INSTDIR? (you might want to place a messagebox just before the file copy as a troubleshooting step to make sure $INSTDIR and $DESKTOP are set to where you think they should be.) And what is the purpose of having ${FileCopy}? It doesn't seem to be used in your example. |
|
|
|
|
|
#3 |
|
Member
Join Date: Jun 2006
Posts: 71
|
I know I have been moving things around with $INSTDIR and $DESKTOP so that shouldn't be a problem. I know the file exists and it is writable to desktop.
what I am trying to do is move a shortcut from the $INSTDIR and put it on the desktop. I was trying to figure out how to use the CreateShortCut option but I figured if I already have one I can just have it moved. |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
CopyFiles "$INSTDIR\IWARN.bat" "$DESKTOP\IWARN.bat"
Or Rename "$INSTDIR\IWARN.bat" "$DESKTOP\IWARN.bat" -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
Looking at the docs, CopyFiles shouldn't need you to specify a destination file name (just the folder). Have I missed something?
|
|
|
|
|
|
#6 |
|
Member
Join Date: Jun 2006
Posts: 71
|
Ok it works now. I guess when I had the files unzip there were other folders made and I didn't realize it. Thanks for your help. you are right about not having to specify a destination file name. But I think you can if you want to rename it.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|