Skip to content
⌘ NSIS Forum Archive

Best Compressor is broken

5 posts

tamachan#

Best Compressor is broken

Sorry for my bad English.

Best Compressor is broken from NSIS 3.0(?)-3.04.

100% Failed (Best Compressor):
setup.nsi (right-click) -> "Compile NSIS Script (Choose Compressor)" -> "Compressor: Best Compressor" -> 100% failed (Can't open output file)

100% Succeeded (Others):
Others ("Choose Compressor"&not "BestCompressor" or "Compile NSIS Script")

Source code: https://gitlab.com/devill.tamachan/binaryeditorbz (Bz/NSIS/setup.nsi)
NSIS log (Best Compressor: failed): https://pastebin.com/UWJ9dTrv
NSIS log (LZMA Solid: succeeded): https://pastebin.com/aH4mPBJC
tamachan#
Antivirus is probably innocent.

100% success on XP (VMWare).
100% failed on Win8.1.

procmon screenshot (end of log: SHARING VIOLATION by makensis.exe): https://i.imgur.com/hjdMwgV.png
Anders#
Originally Posted by tamachan View Post
Antivirus is probably innocent.
And you base that on what? And please answer the question, do you have a 3rd-party antivirus product/suite installed on the machine where it fails?

Can't open output file
Is a giant AV flag for me.

Failure to open can be 3 things:

* Your user does not have write access to the file. Unlikely given that normal compression works.
* Open handle to the old file, this would be a bug in MakeNsisW but unlikely given that it works on another machine. Another application could also be locking the file. Maybe close open Explorer windows so that Explorer does not try to read the icon.
* Antivirus. We see this time and time again, security software keeping files locked while scanned.
tamachan#
I found a solution.


It was not a bug in NSIS. It was a bug in Windows 8.1. I'm sorry.


Wouldn't it be possible to compile even if "ApplicationExperience" is disabled like NSIS2?
If the output file is locked, NSIS2 seemed to retry after waiting for the lock to be released.