Microsoft's nearly two operating systems, Windows 8 and Windows 10, use the wizard interface style, in fact, the modern UI (new user interface) with this similar interface style, if the user design a welcome page, you can add the installation introduction, whether immediately to execute options. Let's take a look at its implementation code below.
; NSIs Modern User Interface
; Basic Example Script
; Written by Joost Verburg
;--------------------------------
; Include Modern UI
!include "Mui2.nsh"
;--------------------------------
; General
; Name and file
Name "Modern UI Test"
OutFile "Basic.exe"
;D Efault installation Folder
InstallDir "$LOCALAPPDATAModern UI Test"
; Get installation folder from registry if available
Installdirregkey HKCU "Softwaremodern UI Test" ""
; Request application privileges for Windows Vista
Requestexecutionlevel User
;--------------------------------
; Interface Settings
!define mui_abortwarning
;--------------------------------
; Pages
!insertmacro mui_page_license "${nsisdir}docsmodern UILicense.txt"
!insertmacro mui_page_components
!insertmacro mui_page_directory
!insertmacro Mui_page_instfiles
!insertmacro mui_unpage_confirm
!insertmacro Mui_unpage_instfiles
;--------------------------------
; Languages
!insertmacro mui_language "中文版"
;--------------------------------
; Installer Sections
section, "Dummy section" Secdummy
Setoutpath "$INSTDIR"
; ADD YOUR OWN FILES here ...
; Store installation Folder
Writeregstr HKCU "Softwaremodern UI Test" "$INSTDIR
; Create Uninstaller
Writeuninstaller "$INSTDIRUninstall. exe"
Sectionend
;--------------------------------
;D escriptions
; Language strings
Langstring desc_secdummy ${lang_english} "A test section."
; Assign Language strings to sections
!insertmacro Mui_function_description_begin
!insertmacro Mui_description_text ${secdummy} $ (Desc_secdummy)
!insertmacro Mui_function_description_end
;--------------------------------
; Uninstaller section
section "Uninstall"
; ADD YOUR OWN FILES here ...
Delete "$INSTDIRUninstall. exe"
RMDir "$INSTDIR"
Deleteregkey/ifempty HKCU "Softwaremodern UI Test"
Sectionend