Skip to content
⌘ NSIS Forum Archive

Error in EnvVarUpdate.nsh after upgrading to v3

2 posts

jesseconductor#

Error in EnvVarUpdate.nsh after upgrading to v3

I've upgraded to v3.05 as I was getting some odd results with v2.x (it would hang on some systems even though it was run inside a docker container).

I'm now getting the following error:

Error: unterminated string parsing line at macro:_IncludeStrFunction1:7
Error in macro _IncludeStrFunction1 on macroline 7
!include: error in script: "EnvVarUpdate.nsh" on line 49
Error in script "/artifacts/build/windows/MyProgrm.nsi" on line 65 -- aborting creation process
I get the same issue from lines 50 and 51 in EnvVarUpdate.nsh

Any ideas on how to correct or at least how to debug a bit more? I'm new to NSIS. MyProgrm.nsi was written by someone else and I'm picking it up...

Cheers,

Jesse
Anders#
There were some changes to how StrFunc.nsh defines its functions.

Change the !define un.${StrFuncName} line to

!define un.${StrFuncName} '${Un${StrFuncName}}'
but this header is old, https://nsis.sourceforge.io/EnVar_plug-in is a better alternative.