Skip to content
⌘ NSIS Forum Archive

Variables are not expanded

2 posts

awkravchuk#

Variables are not expanded

Hey. I'm using NSIS 3.10 from MSYS2 distribution. I'm trying to launch a tool (Imagemagick convert) with !system directive using temporary directory like this:

!system 'convert icon.png ${PLUGINSDIR}\icon.ico'
but NSIS passes the string '${PLUGINSDIR}" directly to convert tool, without expanding the variable. The same happens using env variables like $%TEMP%.

Even doing

!verbose 4
!echo ${PLUGINSDIR}
prints "${PLUGINSDIR}" literally.

What can I be missing here?
Anders#
${PLUGINSDIR} would have to be a custom define that you are setting, NSIS does not have this define. There is $PLUGINSDIR but that only exists at run-time. $%TEMP% should work however.​