I have come across a strange behaviour on Windows ServerCore
What I am doing is in an upgrade situation, I am copying the existing configuration files to the $TEMP directory. Then I do an install of the new files. After that I copy the configuration from $TEMP back into InstDir.
This works fine on Windows7, but on ServerCore I am getting file copy errors.
To try to get some error message back from the Copy, I used cmd to copy the files, and then, that worked! So using the DOS copy command works, but CopyFiles doesnt.
Any Ideas why?
;Restore the pre-existing settings files
ClearErrors
Delete "$INSTDIR\My.cfg"
${If} ${Errors}
!insertmacro Log 2 "ERROR: Can't delete $INSTDIR\My.cfg"
ClearErrors
${Else}
!insertmacro Log 3 "Deleted $INSTDIR\My.cfg"
${EndIf}
ClearErrors
CopyFiles "$TEMP\My.cfg" "$INSTDIR\My.cfg"
${If} ${Errors}
!insertmacro Log 2 "ERROR: Copy Files $TEMP\My.cfg $INSTDIR\My.cfg"
Exec 'cmd /K copy "$TEMP\My.cfg" "$INSTDIR\My.cfg" '
${EndIf}