I am using FileCopy of NSIS installer to copy a folder along with its all subfiles from a source to destination. This works on XP but not on Windows 7. When i run the installer on Windows 7 , then the FileCopy dialog doesn't even appears, it is just skipped out. But in Windows XP, it properly shows the dialog box of "Copying Files" and succeeds. What's the problem? Please help.
!define FileCopy `!insertmacro FileCopy`
!macro FileCopy FilePath TargetDir
CreateDirectory `${TargetDir}`
CopyFiles `${FilePath}` `${TargetDir}`
!macroend
${FileCopy} 'C:\ACCBK\*.*' '$INSTDIR\ACCBK\'
To make sure the installer runs as admin, use this code:
If this is the problem, it means it was actually broken on XP as well (Any version of NT really), you just forgot to test as non-admin.
CopyFiles just calls SHFileOperation, but there could be some breaking changes between XP and Vista+ of course...