home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / nsis-2.46-setup.exe / Examples / Modern UI / WelcomeFinish.nsi < prev   
Encoding:
NSIS script  |  2008-02-03  |  2.0 KB  |  93 lines

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