Copyfiles and Variable trouble
Ok, I'm either reading something incorrectly or theres a bug in NSIS somewhere... probably I'm reading it incorrectly...
I have this macro/function thingie, and it produces an error on this line:
CopyFiles "$EXEDIR\Updates\$R1\$R2" "$R0\$R2" "$R3"
And... well I've tried a number of different things. And I can get it to work without the third parameter... but for some reason, with or without quotes, the third parameter doesn't work and it flags a compile error. Any ideas?
Here is the code for the entire macro/function.
Function fCopyAFile
;fType = R1, fName = R2, fSize = R3
Pop $R3
Pop $R2
Pop $R1
StrCpy $R0 "$INSTDIR\Bin"
StrCmp "$R1" "IE" cIsIE
StrCmp "$R1" "XP" cIsNormal
StrCmp "$R1" "2k" cIsNormal
cIsIE:
StrCpy $R0 "$INSTDIR\Bin\IE6"
cIsNormal:
CopyFiles "$EXEDIR\Updates\$R1\$R2" "$R0\$R2" "$R3"
IfErrors "" cEnd
MessageBox MB_RETRYCANCEL "Error copying $EXEDIR\Updates\$R1\$R2! Try again?" IDRETRY cIsNormal
Abort "Could not copy $EXEDIR\Updates\$R1\$R2"
cEnd:
FunctionEnd
!macro CopyAFile fType fName fSize
Push fType
Push fName
Push fSize
Call fCopyAFile
!macroend