Archive: Copying files from a network path


Copying files from a network path
I am trying to copy files from a network path during installation, however; the files are not copied.

!define FileCopy `!insertmacro FileCopy`
!macro FileCopy FilePath TargetDir
CreateDirectory '${TargetDir}'
CopyFiles '${FilePath}' '${TargetDir}'
!macroend


Section "!Application" SecApplication
SectionIn RO

${FileCopy} '\\networkpath\path\file.txt' '$INSTDIR'

SectionEnd


Is there something I'm missing?

There maybe several reasons:

1) Maybe not every user has the same mapping for \\networkpath\ - file cannot be found
2) Is target dir. accessible (UAC problems) ?
3) Was target dir. created? Check error flag

And do not use the same name 'FileCopy' for symbol and macro name.