Question

I have a file section-db.nsh containing:

!macro uninstall_myrian
    Delete $APPDATA\Intrasense\settings\admin.txt
    Delete $APPDATA\Intrasense\settings\user.txt    
!macroend

and test.nsi with

!include "MUI2.nsh"
!include "section-db.nsh"

Name "Software"
OutFile "installer.exe"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES

Section hello
SectionEnd

Should compile correctly, right? well no:

!include: "section-db.nsh"
!macro: macro named "uninstall_myrian" already found!
!include: error in script: "section-db.nsh" on line 2
Error in script "Y:\prog\scripts\installer-script\test.nsi" on line 2 -- aborting creation process

If I comment the MUI2.nsh include, it compiles correctly.

If I rename the macro to myrian_uninst, it compiles correctly.

What's the problem?

Was it helpful?

Solution

Other than a missing !insertmacro MUI_LANGUAGE English your code compiles without warning in NSIS 2.46

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top