in the below example it should always overwrite an existing file, unless the switch is set in which case it should only do it if it has a newer copy. however what actually happens is that it always does the if-newer check...
example code that doesn't work:
what am i doing wrong?!include 'MUI.nsh'
!include 'LogicLib.nsh'
Name 'test'
InstallDir "C:\test\"
OutFile "test.exe"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE 'English'
Var /GLOBAL switch_test
Section 'Installation'
SetOutPath $INSTDIR
StrCpy $switch_test '0'
${If} $switch_test == '1'
SetOverwrite ifnewer
${EndIf}
File test.txt
SectionEnd
i'd appreciate a speedy response if possible, i'm already late delivering the software i'm packing due to other delays.
thank you 🙂