
;--------------------------------
;Include Modern UI

  !include "MUI.nsh"

;--------------------------------
;General

  Name "Test"
  OutFile "testinst.exe"
  InstallDir "C:\Program files\Test"

  SetCompressor /SOLID lzma
  
;--------------------------------
;Pages

  !define AppTitle "Test app"

  !define MUI_HEADERIMAGE
  !define MUI_WELCOMEPAGE_TITLE_3LINES
  !define MUI_FINISHPAGE_TITLE_3LINES
  !define MUI_ABORTWARNING
  !insertmacro MUI_PAGE_DIRECTORY
  !insertmacro MUI_PAGE_INSTFILES
  !insertmacro MUI_PAGE_FINISH
  
  !insertmacro MUI_UNPAGE_CONFIRM
  !insertmacro MUI_UNPAGE_INSTFILES
  !insertmacro MUI_UNPAGE_FINISH
  
;--------------------------------
;Languages
  !insertmacro MUI_LANGUAGE "English"
  !insertmacro MUI_LANGUAGE "French"
  !insertmacro MUI_LANGUAGE "German"
  !insertmacro MUI_LANGUAGE "Spanish"

;--------------------------------


  LangString TEST_STRING ${LANG_ENGLISH} "English String"
  LangString TEST_STRING ${LANG_GERMAN} "German String"
  LangString TEST_STRING ${LANG_FRENCH} "French String"

Function .onInit

  !insertmacro MUI_LANGDLL_DISPLAY

FunctionEnd

;Installer Sections

Section "${AppTitle}" SecStarted
  
  SetOutPath "$INSTDIR"
  File sample.nsi
   
  MessageBox MB_DEFBUTTON2|MB_YESNO $(TEST_STRING) /SD IDYES IDYES true  IDNO false
true:
false:
  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd

;--------------------------------
;Uninstaller Section

Section "Uninstall"

   Delete "$INSTDIR\sample.nsi"
   Delete "$INSTDIR\Uninstall.exe"
   RMDir "$INSTDIR"

SectionEnd
