WelcomeFinish.nsi 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ;NSIS Modern User Interface
  2. ;Welcome/Finish Page Example Script
  3. ;Written by Joost Verburg
  4. ;--------------------------------
  5. ;Include Modern UI
  6. !include "MUI2.nsh"
  7. ;--------------------------------
  8. ;General
  9. ;Name and file
  10. Name "Modern UI Test"
  11. OutFile "WelcomeFinish.exe"
  12. Unicode True
  13. ;Default installation folder
  14. InstallDir "$LOCALAPPDATA\Modern UI Test"
  15. ;Get installation folder from registry if available
  16. InstallDirRegKey HKCU "Software\Modern UI Test" ""
  17. ;Request application privileges for Windows Vista
  18. RequestExecutionLevel user
  19. ;--------------------------------
  20. ;Interface Settings
  21. !define MUI_ABORTWARNING
  22. ;--------------------------------
  23. ;Pages
  24. !insertmacro MUI_PAGE_WELCOME
  25. !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
  26. !insertmacro MUI_PAGE_COMPONENTS
  27. !insertmacro MUI_PAGE_DIRECTORY
  28. !insertmacro MUI_PAGE_INSTFILES
  29. !insertmacro MUI_PAGE_FINISH
  30. !insertmacro MUI_UNPAGE_WELCOME
  31. !insertmacro MUI_UNPAGE_CONFIRM
  32. !insertmacro MUI_UNPAGE_INSTFILES
  33. !insertmacro MUI_UNPAGE_FINISH
  34. ;--------------------------------
  35. ;Languages
  36. !insertmacro MUI_LANGUAGE "English"
  37. ;--------------------------------
  38. ;Installer Sections
  39. Section "Dummy Section" SecDummy
  40. SetOutPath "$INSTDIR"
  41. ;ADD YOUR OWN FILES HERE...
  42. ;Store installation folder
  43. WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
  44. ;Create uninstaller
  45. WriteUninstaller "$INSTDIR\Uninstall.exe"
  46. SectionEnd
  47. ;--------------------------------
  48. ;Descriptions
  49. ;Language strings
  50. LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
  51. ;Assign language strings to sections
  52. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  53. !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
  54. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  55. ;--------------------------------
  56. ;Uninstaller Section
  57. Section "Uninstall"
  58. ;ADD YOUR OWN FILES HERE...
  59. Delete "$INSTDIR\Uninstall.exe"
  60. RMDir "$INSTDIR"
  61. DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
  62. SectionEnd