Set overwrite mode on the fly?
Hello, I need to set overwrite mode of some files on the fly, I thought it can be possible by setting SetOverwrite command but it seems it can't be altered by evaluating some variable in a section...

I inserted special page that allows user to choose between
1)overwriting all files
2) overwriting files only if they are newer

Then I checked the selection and wnat to apply the overwrite mode but it didn't work... Any idea? :)

I used this code:

Section "Program files (required)"

StrCmp $CX_DATA_OVER_MODE "0" _yes_overwrite _no_overwrite

_yes_overwrite:
DetailPrint "SetOverwrite on."
SetOverwrite on ;the script runs here but SetOverwrite does not work of course ...
Goto _done_overwrite

_no_overwrite:
DetailPrint "SetOverwrite ifnewer."
SetOverwrite ifnewer ;the script runs here but SetOverwrite does not work of course ...

Goto _done_overwrite
_done_overwrite:

SetOutPath $CX_DATA_DIR
File Redistribute\*.*
...
...