Archive: NSIS outputs 0 byte file


NSIS outputs 0 byte file
Hey, I have an NSIS project that is giving me a heap of trouble and I wondered if anyone here can point me in the right direction.

The .nsi file outputs about 20 files to the install directory. One of them is a .config file "executablename.exe.config" (used in .NET projects).

For some reason, NSIS outputs this file - but there's nothing in it.

Command line:
"C:\Program Files\NSIS\makensis.exe" /NOTIFYHWND 1705462 "C:\abcExecutable\abcExecutable\abcExecutableSetup.nsi"

Here is the code from the section in question:
Section "MainSection" SEC03
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "bin\abcexecutable.exe"
File "Blank.config"

And here is the output:
Section: "MainSection" ->(SEC03)
SetOutPath: "$INSTDIR"
SetOverwrite: ifnewer
File: "abcExecutable.exe" [compress] 500732/1257472 bytes
File: "Blank.config" [compress] 1250/6670 bytes

But when I break right after that line (by using a message box), the install directory contains a file named "Blank.config" which is empty and has a size of 0 bytes.

Any ideas? I can post the rest of the script if needed, but I don't think it will be very helpful. This problem started up about a month ago for no apparent reason. I solved it once by changing the extension of the Blank.config file to Blank.xml (go figure...); but after that it had the same problem.


There is probably already a newer file there which isn't overwritten due to your SetOverwrite call.


So is there any way to fix this permanently? Im having a problem like this.


Yes, use SetOverwrite on.


Hi

is there a other solution for this problem by now?

We use our setup to install new and to repair a already existing program. The setup contains many files (more than 60000 small html files). When i overwrite allways every file, the setup takes always a long time.


You might be able to use SetOverwrite isdiff (which was actually added before 2.0 was out of beta). This will overwrite files if their dates are not identical to the dates of the files in the installer, regardless of whether they are older or newer.


Thank you very much.