Skip to content
⌘ NSIS Forum Archive

%1 in !finalize replaced only once

6 posts

Endy-kun#

%1 in !finalize replaced only once

As title says, it seems in a single !finalize command I can't use %1 multiple times. First one gets replaced properly, but after that it remains as plaintext.

Example
!finalize 'ECHO %1 %1 > echo.txt"'

Not looking for a workaround, just this seems like something that needs to be addressed in the future.
Anders#
You can call !finalize more than once if you need to pass it to multiple tools.

I'll add support for using %1 multiple times if you can come up with a real-world scenario where it is needed.
Endy-kun#
I was using a console tool that takes file input and produces file output. I attempted to derive output filename from %1, but since I had to pass it 2nd time for that it turned out to be a no-go. Of course there are plenty of ways around that, i just thought "ugh, that really should have worked!"