SetOverwrite does not take effect, file can not be replace
When I modify my exe file and compile with NSIS, install, but the old exe did not been replaced, why?
Archive: SetOverwrite does not take effect, file can not be replace
SetOverwrite does not take effect, file can not be replace
When I modify my exe file and compile with NSIS, install, but the old exe did not been replaced, why?
I use SetOverwrite on, or I remove SetOverwrite
Explain it.
The exe is the result of your compiled script?
Is one other exefile?
Happens only with exe?
Provided that you're compiling/extracting the modified exe, could be that for some reason the old exe is in use on the target.
You may debug this by trying to delete the old exe before the extraction of the new, e.g.
Delete /REBOOTOK "$INSTDIR\my_file.exe"
and check the reboot flag.
I try severl times, the problem is still.
At the begin, I Set "SetOverwrite on", the problem exists,
then I changed to "SetOverwrite ifdiff" the problem still exists.
I have a exe file named abc.exe, sometime I modify my abc.exe, and the size of this exe file changed, then I open my .nsi file, compile, and install, then I goto "$INSTDIR" in my computer, I found the size and time of my exe file does not change, that's say the old exe file is not be replaced. The size of the old exe is 300K, the size of new exe file is 380K, the difference is clear.
I try again a minute ago, I install my setup program in virtual machine, need reboot, so I reboot, after reboot, I found the problem is still exists.
When I use Delete /REBOOTOK "$INSTDIR\abc.exe", my abc.exe is not been installed, That's say, When I finished installation and reboot(need reboot), my abc.exe is not exists.
(When I was Installing, old abc.exe is running)
err.. Delete /REBOOTOK - check for reboot flag suggested as a debug solution not a real installer.
When you verify the existence of the reboot flag right after the call to Delete /REBOOTOK "$INSTDIR\abc.exe", that's clearly tells you that abc.exe for some reason is in use, so it's up to you to determine why/how the file is in use thus would not be replaced.
The old exe file can not be replaced even if it is not in use.
I use InstallLib macro to install my abc.exe, is this wrong?
Most likely if you use InstallLib you need to proceed as described in documentation,
http://nsis.sourceforge.net/Docs/AppendixB.html#B.2