KLM
30th September 2003 10:20 UTC
problem with SetOverwrite
Hello,
i need to set the overwrite-flag at runtime. I have readed in the docu (4.4 Realtive Jumps), that this is not possible, because it is a compiler-flag.
I tryed a code alike this:
SetOverwrite On
ReadINIStr $R0 $7 "Field 3" State
StrCmp $R0 "1" Overwrite_Texte
SetOverwrite Off
Overwrite_Texte:
What can i do ?
Thank you very much for your help !
kichik
30th September 2003 12:46 UTC
You can do something such as this:
StrCmp $R0 1 overwrite
SetOverwrite off
File ...
Goto end
overwrite:
SetOverwrite on
File ...
end:
KLM
30th September 2003 13:39 UTC
Hello kichik,
your tip works !
Why don't grow the size of the installer ?
Thank you very much for your fast help !!!
kichik
30th September 2003 13:46 UTC
Because NSIS has a datablock optimizer. It will not add the same file twice. It does however make the section's required size grow (the one you see on the components page and the directory page). If you want to avoid that, simply put one of the File commands in a function and call that function.