The install part works fine.SetCompressor /SOLID lzma
!include "MUI.nsh"
!include "LogicLib.nsh"
OutFile "TEST.exe"
InstallDir "$PROGRAMFILES\Test"
!define EXTENTIONS_ARRAY_LIST_A 'ext1|ext2|ext3|ext4'
!define EXTENTIONS_ARRAY_TYPE_A "TestFile"
Section -Ext
MessageBox MB_OK|MB_ICONEXCLAMATION "Starting Section"
NSISArray::ArrayExists /NOUNLOAD ExtentionsArray
Pop $0
${If} $0 <> 1
NSISArray::New /NOUNLOAD ExtentionsArray 2 2
${EndIf}
MessageBox MB_OK|MB_ICONEXCLAMATION "Starting Process"
NSISArray::WriteListC /NOUNLOAD ExtentionsArray '${EXTENTIONS_ARRAY_LIST_A}' "|"
NSISArray:😁ebug /NOUNLOAD ExtentionsArray
NSISArray::Clear /NOUNLOAD ExtentionsArray
SectionEnd
Section -Uninstaller
SetOutPath "$INSTDIR"
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd
Section -Un.Ext
MessageBox MB_OK|MB_ICONEXCLAMATION "Starting Section"
NSISArray::ArrayExists /NOUNLOAD unExtentionsArray
Pop $0
${If} $0 <> 1
NSISArray::New /NOUNLOAD unExtentionsArray 2 2
${EndIf}
NSISArray:😁ebug /NOUNLOAD unExtentionsArray
NSISArray::WriteListC /NOUNLOAD unExtentionsArray "${EXTENTIONS_ARRAY_LIST_A}" "|"
NSISArray::Clear /NOUNLOAD unExtentionsArray
SectionEnd
Function .onInit
MessageBox MB_OK|MB_ICONEXCLAMATION "Creating array in .onInit"
NSISArray::New /NOUNLOAD ExtentionsArray 2 2
MessageBox MB_OK|MB_ICONEXCLAMATION "Created array on .onInit"
FunctionEnd
Function un.onInit
MessageBox MB_OK|MB_ICONEXCLAMATION "Creating array in un.onInit"
NSISArray::New /NOUNLOAD unExtentionsArray 2 2
MessageBox MB_OK|MB_ICONEXCLAMATION "Created array in un.onInit"
FunctionEnd
Function .onGUIEnd
MessageBox MB_OK|MB_ICONEXCLAMATION "Deleting Array on .onGUIEnd"
NSISArray:😁elete /NOUNLOAD ExtentionsArray
MessageBox MB_OK|MB_ICONEXCLAMATION "Deleted Array on .onGUIEnd"
NSISArray::Unload
FunctionEnd
Function un.onGUIEnd
MessageBox MB_OK|MB_ICONEXCLAMATION "Deleting Array on un.onGUIEnd"
NSISArray:😁elete /NOUNLOAD unExtentionsArray
NSISArray::Unload
MessageBox MB_OK|MB_ICONEXCLAMATION "Deleted Array on un.onGUIEnd"
FunctionEnd
The uninstaller crashes when the first Array command is called (NSISArray::ArrayExists) if the array is created in un.onInit.
CF