; Installer attributes Name "Test InstType" OutFile "test.exe" InstallDir "C:\Temp" ShowInstDetails show ShowUnInstDetails show SetCompress auto SetCompressor lzma CRCCheck force ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE ; Components page !define MUI_PAGE_CUSTOMFUNCTION_LEAVE postCompPage !insertmacro MUI_PAGE_COMPONENTS ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !insertmacro MUI_PAGE_FINISH ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ ; Includes !include "Sections.nsh" !include "LogicLib.nsh" ;Callback functions Function .onInit ; Check if already running... System::Call 'kernel32::CreateMutexA(i 0, i 0, t "OtoMnbInstall")i .r0 ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_OK|MB_ICONINFORMATION "The installer is already running." Abort FunctionEnd ; Page Functions Function postCompPage GetCurInstType $R0 MessageBox MB_OK|MB_ICONINFORMATION "The install type is $R0." Abort FunctionEnd ; Installation types InstType "Type 0" InstType "Type 1" InstType "Type 2" ;Subsections and sections SubSection /e "Subsection 1" Section "Section 1-1" SectionIn 1 2 3 SectionEnd Section "Section 1-2" SectionIn 1 2 SectionEnd SubSectionEnd