Nsis Modern Ui Installer Icon Average ratng: 3,5/5 2433 votes
Nullsoft Scriptable Install System
Original author(s)Nullsoft
Developer(s)NSIS Team and NSIS Community
Initial release31 July 2001; 18 years ago[1]
Stable release
3.05 / 16 December 2019; 2 months ago
Repository
Written inC, C++
Operating systemWindows, Mac OS X
TypeSoftware development tools
Licensezlib License
Websitensis.sourceforge.io

Nullsoft Scriptable Install System (NSIS) is a script-driven installer authoring tool for Microsoft Windows backed by Nullsoft, the creators of Winamp. NSIS is released under a combination of free software licenses, primarily the zlib license.[2] It has become a widely used alternative to commercialproprietary products like InstallShield, with users including Amazon.com, Dropbox, Google, Ubisoft, FL Studio, BitTorrent, and McAfee.[3]Driver bam huawei e3531 firmware free.

History[edit]

NSIS was created to distribute Winamp.[4] It is based on a previous Nullsoft product, PiMP (plugin Mini Packager), and is also known as SuperPiMP. After version 2.0a0, the project was moved to SourceForge where developers outside Nullsoft started working on it on a regular basis. NSIS 2.0 was released approximately two years later.

The Modern UI provides a user interface for NSIS installers with a modern wizard style, similar to the wizards of recent Windows versions. It is based on the basic user interface that is provided by the NSIS compiler itself and extends it with more interface features and pages.

NSIS version 1 is in many ways similar to the classic Windows Installer, but it supports more compression formats. NSIS version 2 features a new streamlined graphical user interface and supports LZMA compression, multiple languages, and an easy-to-use plugin system.

In January 2006 NSIS was SourceForge's project of the month.[5][6]

Script examples[edit]

Hello world![edit]

Simple installer[edit]

Concepts[edit]

NSIS 1.98

Script[edit]

The NSIS compiler program makensis compiles scripts like the following example into executable installation programs. Each line in the script contains a single command.

Modern user interface[edit]

Version 2.0 introduced a new optional streamlined graphical user interface called Modern UI (MUI). The MUI has a wizard-like interface. It supports a welcome page, finish page, language selection dialog, description area for components, and greater customization options than the old user interface.

Since NSIS version 2.30 (Released on 25 August 2007) there is new version (beta) of this UI accessible: Modern UI 2 (MUI2) which is an enhancement to Modern UI. Unlike the old MUI this version is based on nsDialogs instead of old-fashioned InstallOptions .ini files.

From version 2.34 (Released on 24 December 2007) this MUI2 is ready for mass consumption and it is included in all NSIS packages. Also all examples had been switched to it.

Modern UI 2 documentation.

Graphical interfaces[edit]

NSIS projects can be configured by simply editing text files (with .nsi extension). However, several third parties provide editing software:

  • EclipseNSIS is a module for the Eclipse platform. It allows NSIS scripts to be edited, compiled and validated.
  • HM NIS Edit (freeware) editor with support of custom C++ or Delphi plug-ins.
  • Venis (freeware) editor
  • Visual & Installer is an add-in which integrates NSIS with Microsoft Visual Studio IDE and allows to create and build NSIS projects right within it.

Installer interfaces[edit]

Several projects that extend or replace the Modern UI have started in the past few years. Interfaces such as the ExperienceUI and UltraModernUI completely change the style of the installer by skinning it to look like the InstallShield interface. Other interfaces like installSpiderUI aim for a more minimalistic approach on the visual side of things while maintaining the same level of functionality as the ASD.

Plugins[edit]

NSIS can be extended with plugins that can communicate with the installer. Plugins can be written in any unmanaged programming language capable of building a dynamic-link library (such as C, C++ or Delphi), and they can be used to perform installation tasks or extend the installer interface. A plugin can be called with a single line of NSIS code.

Several plugins come with the NSIS package that permit the installer to display a splash screen, display a custom page, display an image on the background, download files from a website, perform mathematical operations, patch files and more.

Other plugins are available online, including ZipDLL, and a Python plugin.

Features[edit]

NSIS supports the following features:[7]

  • zlib, bzip2, and LZMA compression
  • Script-based
  • Multilingual
  • Plugin support
  • Script preprocessor

Generated installer[edit]

The generated installer is a Portable Executable, with the installation files archived within the installer, a 34 KB overhead for the NSIS installer,[7] and the installation script compiled into executable code. As the installation script is compiled, the script cannot be obtained from the delivered executable without reverse-engineering the binary.

The archive may be unpacked using 7-Zip, the Total Commander plugin InstallExplorer, or the FAR Manager plugin InstallExplorer.

The archive contains several folders:

  • $PLUGINSDIR : installation routine plugins
  • $INSTDIR : files used during the installation
  • $_OUTDIR : files to be installed.

The generated installer includes command line arguments in order to give users more control:[8]

  • /NCRC disables the CRC check, unless the script forces it
  • /S runs the installer/uninstaller silently.
  • /D sets the default installation directory. It must be the last parameter and must not contain any quotes. Only absolute paths are supported.

Unicode support[edit]

Versions of NSIS before 3.0 did not support Unicode, but only a means to convert some files to different encodings via a plugin.[9] However, a variant of NSIS that has full Unicode support is available.[10] Notable projects using this variant are:[11]

  • Google (Picasa)
  • Apache OpenOffice for Windows
  • Mozilla (Firefox, Mozilla Thunderbird)

With the release of version 3.0 of NSIS, Unicode support can be implemented using the compiler directive 'Unicode true'. This gives full Unicode support with no further code changes, but the installer will not run under Windows 95/98/Me.[12] As of 2016 before the 3.0 release NSIS was available in the PortableApps format for Unicode 2.46.5 Rev 3 and ANSI 2.51.[13]

See also[edit]

References[edit]

  1. ^NSIS 1.x Version History - NSIS wiki
  2. ^'NSIS licence page'. NSIS.
  3. ^'Users - NSIS'.
  4. ^Winamp 2.60 released, From Betanews, 2000-02-14, Tweakers, ..namely featuring a new 'SuperPiMP' installation system..
  5. ^SourceForge.net Project of the Month in January 2006
  6. ^'OpenCandy Installer Platform Comparison'. Archived from the original on 27 June 2011. Retrieved 27 June 2011.CS1 maint: BOT: original-url status unknown (link)
  7. ^ ab'Features'. NSIS.
  8. ^'installerUsage'. NSIS.
  9. ^'Unicode plug-in'. NSIS.
  10. ^'Unicode NSIS Project Page'.
  11. ^'Unicode NSIS Project Users'.
  12. ^'NSIS Users Manual Chapter 1'. NSIS. Retrieved 26 May 2015.
  13. ^'NSIS Portable'. PortableApps.com. 19 May 2016. Retrieved 4 July 2016.

External links[edit]

Wikimedia Commons has media related to Nullsoft Scriptable Install System.
  • Official website
  • NSIS on SourceForge.net
  • NSIS at Open Hub
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&oldid=936695282'

NSIS 2 makes it is possible to create installers with a custom user interface. The Modern UI is an interface with a style like the wizards of recent Windows versions.

This new interface also features new pages (Welcome, Finish, Start Menu) and a description area on the components page. The interface and the graphics can be customized using the provided settings.

Using the Modern UI macros and language files, writing scripts with a modern interface is easy. This document contains information about writing Modern UI scripts and a reference of all settings.

Important: Because the Modern UI has its own macro system, its own default settings and a lot of new features, the interface configuration works differently. So you should not use commands like LicenseText, Icon, CheckBitmap, InstallColors etc.

Screenshots

The Modern UI has a macro system, so all the code to control the interface has already been written for you.

If you want to start a new Modern UI script or upgrade an older script with the Classic UI, follow the steps below.

Taking a look at the example scripts will also help you to learn more about the Modern UI.

Syntax

Some defines (e.g. MUI_COMPONENTSPAGE_SMALLDESC) don't need a value, they are true/false settings. Others (e.g. MUI_UI) can be used to define a specific value.

Parameters are specified in this format: required (option1 option2) [optional]

Parameters for defined settings should be in one string:

If you want a certain value (e.g. a text) to be language-specific, set a language string (using LangString) and define $(STRINGNAME) as value. Use a license language string (LicenseLangString) for the license text.

If you want to add ' to a Modern UI string, you should always escape it using $' because the Modern UI macros use ' to separate parameters.

1. Header file

MUI.nsh is in the Include directory, so you don't have to specify a path.

2. Interface Configuration

Interface settings should be set before inserting page macros. Page interface settings apply to all pages of a certain type.

Interface Settings

General Interface Settings

MUI_ICONicon_file
The icon for the installer.
Default: ${NSISDIR}ContribGraphicsIconsmodern-install.ico

Modern

MUI_UNICONicon_file
The icon for the uninstaller.
Default: ${NSISDIR}ContribGraphicsIconsmodern-uninstall.ico

MUI_HEADERIMAGE
Display an image on the header of the page.

MUI_HEADERIMAGE_BITMAPbmp_file
Bitmap image to display on the header of installers pages (recommended size: 150x57 pixels).
Default: ${NSISDIR}ContribGraphicsHeadernsis.bmp

MUI_HEADERIMAGE_BITMAP_NOSTRETCH
Do not stretch the installer header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_BITMAP_RTLbmp_file
Bitmap image to display on the header of installers pages when using a RTL language (recommended size: 150x57 pixels).
Default: Non-RTL bitmap

MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
Do not stretch the installer header bitmap when using a RTL language to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_UNBITMAPbmp_file
Bitmap image to display on the header of uninstaller pages (recommended size: 150x57 pixels).
Default: Installer header bitmap

MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH
Do not stretch the uninstaller header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_UNBITMAP_RTLbmp_file
Bitmap image to display on the header of uninstallers pages when using a RTL language (recommended size: 150x57 pixels).
Default: Installer RTL header bitmap

MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH
Do not stretch the uninstaller header bitmap when using a RTL language to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_RIGHT
Display the header image on the right side instead of the left side (when using a RTL language it will be displayed on the left side instead of the right side).

MUI_BGCOLOR(color: RRGGBBR hexadecimal)
Background color for the header, the Welcome page and the Finish page.
Default: FFFFFF

MUI_HEADER_TRANSPARENT_TEXT
Set a transparent background for the header's label controls. Useful for custom user interfaces that set a bigger header image.

Interface Resource Settings

MUI_UIui_file
The interface file with the dialog resources. Change this if you have made your own customized UI.
Default: ${NSISDIR}ContribUIsmodern.exe

MUI_UI_HEADERIMAGEui_file
The interface files with the dialog resource IDD_INST that contains a bitmap control and space for the header bitmap.
Default: ${NSISDIR}ContribUIsmodern_headerbmp.exe

MUI_UI_HEADERIMAGE_RIGHTui_file
The interface files with the dialog resource IDD_INST that contains a bitmap control and space for the header bitmap on the right side.
Default: ${NSISDIR}ContribUIsmodern_headerbmpr.exe

MUI_UI_COMPONENTSPAGE_SMALLDESCui_file
The interface files with a customized dialog resource IDD_SELCOM with a small description area.
Default: ${NSISDIR}ContribUIsmodern_smalldesc.exe

Xtgem de n gage 2.0 cracked games. MUI_UI_COMPONENTSPAGE_NODESCui_file
The interface files with a customized dialog resource IDD_SELCOM without a description area.
Default: ${NSISDIR}ContribUIsmodern_nodesc.exe

Welcome/Finish Page Interface Settings

MUI_WELCOMEFINISHPAGE_BITMAPbmp_file
Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).
Default: ${NSISDIR}ContribGraphicsWizardwin.bmp

MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

Welcome/Finish Page InstallOptions INI Settings

MUI_WELCOMEFINISHPAGE_INIini_file
InstallOptions INI file for the Welcome page and the Finish page.
Default: ${NSISDIR}ContribModern UIioSpecial.ini

Uninstaller Welcome/Finish Page Settings

MUI_UNWELCOMEFINISHPAGE_BITMAPbmp_file
Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).
Default: ${NSISDIR}ContribGraphicsWizardwin.bmp

MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

Uninstaller Welcome/Finish Page Interface INI Settings

MUI_UNWELCOMEFINISHPAGE_INIini_file
InstallOptions INI file for the uninstaller Welcome page and the Finish page.
Default: ${NSISDIR}ContribModern UIioSpecial.ini

License Page Interface Settings

MUI_LICENSEPAGE_BGCOLOR(/windows /grey (color: RRGGBB hexadecimal))
The background color for the license textbox. Use /windows for the Windows text background color (usually white). Use the /grey for the window background color (usually grey).
Default: /windows

Components Page Interface Settings

MUI_COMPONENTSPAGE_CHECKBITMAPbitmap_file
The bitmap with images for the checks of the component select treeview.
Default: ${NSISDIR}ContribGraphicsChecksmodern.bmp

MUI_COMPONENTSPAGE_SMALLDESC
A small description area on the bottom of the page. Use this layout if you have a lot of sections and don't need large descriptions.

MUI_COMPONENTSPAGE_NODESC
No description area.

Installation Page Interface Settings

MUI_INSTFILESPAGE_COLORS(/windows (foreground color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal))
The colors of the details screen. Use /windows for the default Windows colors.
Default: /windows

MUI_INSTFILESPAGE_PROGRESSBAR(' colored smooth)
The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.
Default: smooth

Installer Finish Page Interface Settings

MUI_FINISHPAGE_NOAUTOCLOSE
Do not automatically jump to the finish page, to allow the user to check the install log.

Uninstaller Finish Page Interface Settings

MUI_UNFINISHPAGE_NOAUTOCLOSE
Do not automatically jump to the finish page, to allow the user to check the uninstall log.

Abort Warning Settings

MUI_ABORTWARNING
Show a message box with a warning when the user wants to close the installer.

MUI_ABORTWARNING_TEXTtext
Text to display on the abort warning messagebox.

Uninstaller Abort Warning Settings

MUI_UNABORTWARNING
Show a message box with a warning when the user wants to close the uninstaller.

MUI_UNABORTWARNING_TEXTtext
Text to display on the abort warning messagebox.

3. Pages

Insert the following macros to set the pages you want to use. The pages will appear in the order you insert them in your script. You can also insert custom Page commands between the macros to add custom pages. More info about custom pages..

You can add multiple pages of certain types (for example, if you want the user to specify multiple folders).

Examples:

You will need the page ID for the Start Menu Folder page when using the Start Menu Folder macros. The Start Menu Folder will be stored in the specified variable.

Installer Pages
MUI_PAGE_WELCOME
MUI_PAGE_LICENSE text/rtf_file
MUI_PAGE_COMPONENTS
MUI_PAGE_DIRECTORY
MUI_PAGE_STARTMENU page_id variable
MUI_PAGE_INSTFILES
MUI_PAGE_FINISH

Uninstaller Pages
MUI_UNPAGE_WELCOME
MUI_UNPAGE_CONFIRM
MUI_UNPAGE_LICENSE text/rtf_file
MUI_UNPAGE_COMPONENTS
MUI_UNPAGE_DIRECTORY
MUI_UNPAGE_INSTFILES
MUI_UNPAGE_FINISH

Page Settings

Page Settings apply to a single page and should be set before inserting a page macro. If you have multiple pages of one type and you want to set a setting for all them, put the setting before each page macro. Example:

Note: There is no difference between installer and uninstaller page settings.

General Page Settings

MUI_PAGE_HEADER_TEXTtext
Text to display on the header of the page.

MUI_PAGE_HEADER_SUBTEXTtext
Subtext to display on the header of the page.

Welcome Page Settings

MUI_WELCOMEPAGE_TITLEtitle
Title to display on the top of the page.

MUI_WELCOMEPAGE_TITLE_3LINES
Extra space for the title area.

MUI_WELCOMEPAGE_TEXTtext
Text to display on the page. Use rn for a newline.

License Page Settings

MUI_LICENSEPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_LICENSEPAGE_TEXT_BOTTOMtext
Text to display on the bottom of the page.

MUI_LICENSEPAGE_BUTTONbutton_text
Text to display on the 'I Agree' button.

MUI_LICENSEPAGE_CHECKBOX
Display a checkbox the user has to check to agree with the license terms.

MUI_LICENSEPAGE_CHECKBOX_TEXTtext
Text to display next to the checkbox to agree with the license terms.

MUI_LICENSEPAGE_RADIOBUTTONS
Display two radio buttons to allow the user to choose between accepting the license terms or not.

MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPTtext
Text to display next to the checkbox to accept the license terms.

MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINEtext
Text to display next to the checkbox to decline the license terms.

Components Page Settings

MUI_COMPONENTSPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_COMPONENTSPAGE_TEXT_COMPLISTtext
Text to display on next to the components list.

MUI_COMPONENTSPAGE_TEXT_INSTTYPEtext
Text to display on next to the installation type combo box.

MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLEtext
Text to display on the of the top of the description box.

MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFOtext
Text to display inside the description box when no section is selected.

Directory Page Settings

MUI_DIRECTORYPAGE_TEXT_TOPtext
Text to display on top of the page.

MUI_DIRECTORYPAGE_TEXT_DESTINATIONtext
Text to display on the destination folder frame.

MUI_DIRECTORYPAGE_VARIABLEvariable
Variable in which to store the selected folder.
Default: $INSTDIR

MUI_DIRECTORYPAGE_VERIFYONLEAVE
Does not disable the Next button when a folder is invalid but allows you to use GetInstDirError in the leave function to handle an invalid folder.

Start Menu Folder Page Settings

Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros:

The page ID should be the ID of the page on which the user has selected the folder for the shortcuts you want to write.

MUI_STARTMENUPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_STARTMENUPAGE_TEXT_CHECKBOXtext
Text to display next to the checkbox to disable the Start Menu folder creation.

MUI_STARTMENUPAGE_DEFAULTFOLDERfolder
The default Start Menu Folder.

MUI_STARTMENUPAGE_NODISABLE
Do not display the checkbox to disable the creation of Start Menu shortcuts.

MUI_STARTMENUPAGE_REGISTRY_ROOTroot
MUI_STARTMENUPAGE_REGISTRY_KEYkey
MUI_STARTMENUPAGE_REGISTRY_VALUENAMEvalue_name
The registry key to store the Start Menu folder. The page will use it to remember the users preference. You should also use for the uninstaller to remove the Start Menu folders. Don't forget to remove this key during uninstallation.

For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu folder:

Installation Page Settings

MUI_INSTFILESPAGE_FINISHHEADER_TEXTtext
Text to display on the header of the installation page when the installation has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).

MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXTtext
Subtext to display on the header of the installation page when the installation has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).

MUI_INSTFILESPAGE_ABORTHEADER_TEXTtext
Text to display on the header of the installation page when the installation has been aborted.

MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXTtext
Subext to display on the header of the installation page when the installation has been aborted.

Finish Page Settings

MUI_FINISHPAGE_TITLEtitle
Title to display on the top of the page.

MUI_FINISHPAGE_TITLE_3LINES
Extra space for the title area.

MUI_FINISHPAGE_TEXTtext
Text to display on the page. Use rn for a newline.

MUI_FINISHPAGE_TEXT_LARGE
Extra space for the text area (if using checkboxes).

MUI_FINISHPAGE_BUTTONtext
Text to display on the Finish button.

MUI_FINISHPAGE_TEXT_REBOOTtext
Text to display on the finish page when asking for a system reboot. Use rn for a newline.

MUI_FINISHPAGE_TEXT_REBOOTNOWtext
Text to display next to the 'Reboot now' option button.

MUI_FINISHPAGE_TEXT_REBOOTLATERtext
Text to display next to the 'Reboot later' option button.

MUI_FINISHPAGE_RUNexe_file
Application which the user can select to run using a checkbox. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_RUN_TEXTtext
Texts to display next to the 'Run program' checkbox.

MUI_FINISHPAGE_RUN_PARAMETERSparameters
Parameters for the application to run. Don't forget to escape double quotes in the value (use $').

MUI_FINISHPAGE_RUN_NOTCHECKED
Do not check the 'Run program' checkbox by default

MUI_FINISHPAGE_RUN_FUNCTIONfunction_name
Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without parameters). You can use the function to execute multiple applications or you can change the checkbox name and use it for other things.

MUI_FINISHPAGE_SHOWREADMEfile/url
File or website which the user can select to view using a checkbox. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_SHOWREADME_TEXTtext
Texts to display next to the 'Show Readme' checkbox.

MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
Do not check the 'Show Readme' checkbox by default

MUI_FINISHPAGE_SHOWREADME_FUNCTIONfunction_name
Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without parameters). You can use the function to show multiple files or you can change the checkbox name and use it for other things.

MUI_FINISHPAGE_LINKlink_text
Text for a link on the which the user can click to view a website or file.

MUI_FINISHPAGE_LINK_LOCATIONfile/url
Website or file which the user can select to view using the link. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_LINK_COLOR(color: RRGGBB hexadecimal)
Text color for the link on the Finish page.
Default: 000080

MUI_FINISHPAGE_NOREBOOTSUPPORT
Disables support for the page that allows the user to reboot the system. Define this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.

Uninstall Confirm Page Settings

MUI_UNCONFIRMPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_UNCONFIRMPAGE_TEXT_LOCATIONtext
Text to display next to the uninstall location text box.

Advanced Page Settings

You can add custom code to the page functions of your Modern UI pages. More info..

4. Custom functions

If you want add your own code to functions inserted by the Modern UI (e.g. the .onGUIInit function and the page functions), create your own function and let the Modern UI functions call them.

5. Language files

Insert the Modern UI language files for the languages to want to include.

The Modern UI language files load the NLF language files, so you should not use LoadLanguageFile.

Language Selection Dialog

If you want the installer to display a language selection dialog (have a look at the MultiLanguage.nsi example), insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:

You can also use this macro for the uninstaller, in the un.onInit function.

Language Selection Dialog Settings

To remember the user's preference, you can define a registry key.
Note: These defines should be set before inserting the installation page macro.

MUI_LANGDLL_REGISTRY_ROOTroot
MUI_LANGDLL_REGISTRY_KEYkey
MUI_LANGDLL_REGISTRY_VALUENAMEvalue_name
The registry key to store the language. The users preference will be remembered. You can also use it for the uninstaller to display the right language. Don't forget to remove this key in the uninstaller.

For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the stored language preference:

Language Selection Dialog Interface Settings

To customize the language selection dialog interface, use these defines before inserting the MUI_LANGDLL_DISPLAY macro.

MUI_LANGDLL_WINDOWTITLEtext
The window title of the language selection dialog.

MUI_LANGDLL_INFOtext
The text to display on the language selection dialog.

MUI_LANGDLL_ALWAYSSHOW
Always show the language selection dialog, even if a language has been stored in the registry. The language stored in the registry will be selected by default.

6. Reserve files

If you are using solid compression, it's important that files which are being extracted in init- or page functions function are located before other files in the data block, because this will make your installer faster.

If there are File commands in your sections or functions above the init- or page functions, add the reserve file macros above your sections and functions.

7. Your own sections and functions

Add your installer sections and functions. See the NSIS Users Manual for details.

Information about section code and function code for Start Menu shortcut creation and language selection can be found above.

8. Section descriptions

The descriptions of sections will be displayed on the components page, when the user hovers the mouse over a section. If you don't want to use descriptions, use the MUI_COMPONENTSPAGE_NODESC interface setting.

To set a description for a section, you have to add an additional parameter to the Section commmand with a name for the define that should contain the section number.

Use these macros to set the descriptions:

For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END macros.

If you want add your custom pages to your installer, you should insert your own page commands between the page macros.

Using InstallOptions for custom pages

InstallOptions is a plug-in that displays custom pages that you can create using INI files.

Have a look at the InstallOptions documentation for info about creating InstallOptions INI files.

First, you have to extract your InstallOptions INI File in the .onInit function (un.onInit for the uninstaller) using the MUI_INSTALLOPTIONS_EXTRACT macro:

If your INI File is located in another directory, use MUI_INSTALLOPTIONS_EXTRACT_AS. The second parameter is the filename for the temporary plug-ins directory, use this filename as parameter for the other InstallOptions macros.

You can call Instal Options in the function defined with the Page or UninstPage command using the MUI_INSTALLOPTIONS_DISPLAY macro. Use the MUI_HEADER_TEXT macro to set the text on the page header:

For custom fonts and colors, macros for the initDialog and show functions of InstallOptions are also available:

If you need the InstallOptions return value (success, back, cancel, error), use the MUI_INSTALLOPTIONS_DISPLAY_RETURN or MUI_INSTALLOPTIONS_SHOW_RETURN macro. The return value will be added to the stack, so you can use the Pop command to get it.

Use these macros to read or write INI file values:

For example, you can use the MUI_INSTALLOPTIONS_READ macro in a section to get the user input:

For more details about InstallOptions, validation of user input etc., check the InstallOptions documentation.

Customize standard dialogs

To change elements on the dialogs, use customized UI resource files (see Interface Configuration). You can change your copies of the original files (in the ContribUIs folder) by using an application such as Resource Hacker.

The 'Please wait while Setup is loading..' text on the splash screen that is being displayed while the installer is starting (Verifying installer, Unpacking data) can be changed by using a customized UI resource file (MUI_UI setting) with a modified dialog 111.
The 'Verifying installer' and 'Unpacking data' texts are defined in the language header file of the NSIS exehead (Sourceexeheadlang.h). To change them, you have to edit this file and recompile NSIS.

To modify the Welcome dialog and Finish dialog, use a custom INI file (MUI_SPECIALINI setting) or write to the INI file in the custom page functions.

If you want add your own code to functions inserted by the Modern UI, such as the .onGUIInit function and the Page functions, create your own function and let the Modern UI functions call them. Use the defines to define the name of your functions.

Example:

General Custom Functions

These defines should be set before inserting the language macros.

MUI_CUSTOMFUNCTION_GUIINITfunction
MUI_CUSTOMFUNCTION_UNGUIINITfunction
MUI_CUSTOMFUNCTION_ABORTfunction
MUI_CUSTOMFUNCTION_UNABORTfunction

Page Custom Functions

These defines should be set before inserting a page macro.

MUI_PAGE_CUSTOMFUNCTION_PREfunction
MUI_PAGE_CUSTOMFUNCTION_SHOWfunction
MUI_PAGE_CUSTOMFUNCTION_LEAVEfunction

Notes:

  • In the Pre function of the Welcome page and the Finish page, you can write to the InstallOptions INI file of the page (ioSpecial.ini)
  • In the Show function of the Welcome, Finish and StartMenu pages, $MUI_HWND contains the HWND of the inner dialog

Welcome/Finish Page Custom Functions

This define should be inserted before a single Welcome or Finish page.

MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INITfunction

This Init function is called before the InstallOptions INI file for the page is written, so you can use it to initialize any variables used in the page settings.

Basic: Basic.nsi
Welcome/Finish page: WelcomeFinish.nsi
Multiple languages: MultiLanguage.nsi
Header image: HeaderBitmap.nsi
Custom pages: InstallOptions.nsi
Start Menu Folder page: StartMenu.nsi

  • 1.75 - April 1, 2006
    • Added show function for the start menu page
    • Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts

Made by Joost Verburg.
Icons designed by Nikos Adamamas, aka adni18.
Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.

The zlib/libpng license applies to the Modern UI.

License Terms

©2002-2006 Joost Verburg

Popular Posts

Nullsoft Scriptable Install System
Original author(s)Nullsoft
Developer(s)NSIS Team and NSIS Community
Initial release31 July 2001; 18 years ago[1]
Stable release
3.05 / 16 December 2019; 2 months ago
Repository
Written inC, C++
Operating systemWindows, Mac OS X
TypeSoftware development tools
Licensezlib License
Websitensis.sourceforge.io

Nullsoft Scriptable Install System (NSIS) is a script-driven installer authoring tool for Microsoft Windows backed by Nullsoft, the creators of Winamp. NSIS is released under a combination of free software licenses, primarily the zlib license.[2] It has become a widely used alternative to commercialproprietary products like InstallShield, with users including Amazon.com, Dropbox, Google, Ubisoft, FL Studio, BitTorrent, and McAfee.[3]Driver bam huawei e3531 firmware free.

History[edit]

NSIS was created to distribute Winamp.[4] It is based on a previous Nullsoft product, PiMP (plugin Mini Packager), and is also known as SuperPiMP. After version 2.0a0, the project was moved to SourceForge where developers outside Nullsoft started working on it on a regular basis. NSIS 2.0 was released approximately two years later.

The Modern UI provides a user interface for NSIS installers with a modern wizard style, similar to the wizards of recent Windows versions. It is based on the basic user interface that is provided by the NSIS compiler itself and extends it with more interface features and pages.

NSIS version 1 is in many ways similar to the classic Windows Installer, but it supports more compression formats. NSIS version 2 features a new streamlined graphical user interface and supports LZMA compression, multiple languages, and an easy-to-use plugin system.

In January 2006 NSIS was SourceForge's project of the month.[5][6]

Script examples[edit]

Hello world![edit]

Simple installer[edit]

Concepts[edit]

NSIS 1.98

Script[edit]

The NSIS compiler program makensis compiles scripts like the following example into executable installation programs. Each line in the script contains a single command.

Modern user interface[edit]

Version 2.0 introduced a new optional streamlined graphical user interface called Modern UI (MUI). The MUI has a wizard-like interface. It supports a welcome page, finish page, language selection dialog, description area for components, and greater customization options than the old user interface.

Since NSIS version 2.30 (Released on 25 August 2007) there is new version (beta) of this UI accessible: Modern UI 2 (MUI2) which is an enhancement to Modern UI. Unlike the old MUI this version is based on nsDialogs instead of old-fashioned InstallOptions .ini files.

From version 2.34 (Released on 24 December 2007) this MUI2 is ready for mass consumption and it is included in all NSIS packages. Also all examples had been switched to it.

Modern UI 2 documentation.

Graphical interfaces[edit]

NSIS projects can be configured by simply editing text files (with .nsi extension). However, several third parties provide editing software:

  • EclipseNSIS is a module for the Eclipse platform. It allows NSIS scripts to be edited, compiled and validated.
  • HM NIS Edit (freeware) editor with support of custom C++ or Delphi plug-ins.
  • Venis (freeware) editor
  • Visual & Installer is an add-in which integrates NSIS with Microsoft Visual Studio IDE and allows to create and build NSIS projects right within it.

Installer interfaces[edit]

Several projects that extend or replace the Modern UI have started in the past few years. Interfaces such as the ExperienceUI and UltraModernUI completely change the style of the installer by skinning it to look like the InstallShield interface. Other interfaces like installSpiderUI aim for a more minimalistic approach on the visual side of things while maintaining the same level of functionality as the ASD.

Plugins[edit]

NSIS can be extended with plugins that can communicate with the installer. Plugins can be written in any unmanaged programming language capable of building a dynamic-link library (such as C, C++ or Delphi), and they can be used to perform installation tasks or extend the installer interface. A plugin can be called with a single line of NSIS code.

Several plugins come with the NSIS package that permit the installer to display a splash screen, display a custom page, display an image on the background, download files from a website, perform mathematical operations, patch files and more.

Other plugins are available online, including ZipDLL, and a Python plugin.

Features[edit]

NSIS supports the following features:[7]

  • zlib, bzip2, and LZMA compression
  • Script-based
  • Multilingual
  • Plugin support
  • Script preprocessor

Generated installer[edit]

The generated installer is a Portable Executable, with the installation files archived within the installer, a 34 KB overhead for the NSIS installer,[7] and the installation script compiled into executable code. As the installation script is compiled, the script cannot be obtained from the delivered executable without reverse-engineering the binary.

The archive may be unpacked using 7-Zip, the Total Commander plugin InstallExplorer, or the FAR Manager plugin InstallExplorer.

The archive contains several folders:

  • $PLUGINSDIR : installation routine plugins
  • $INSTDIR : files used during the installation
  • $_OUTDIR : files to be installed.

The generated installer includes command line arguments in order to give users more control:[8]

  • /NCRC disables the CRC check, unless the script forces it
  • /S runs the installer/uninstaller silently.
  • /D sets the default installation directory. It must be the last parameter and must not contain any quotes. Only absolute paths are supported.

Unicode support[edit]

Versions of NSIS before 3.0 did not support Unicode, but only a means to convert some files to different encodings via a plugin.[9] However, a variant of NSIS that has full Unicode support is available.[10] Notable projects using this variant are:[11]

  • Google (Picasa)
  • Apache OpenOffice for Windows
  • Mozilla (Firefox, Mozilla Thunderbird)

With the release of version 3.0 of NSIS, Unicode support can be implemented using the compiler directive 'Unicode true'. This gives full Unicode support with no further code changes, but the installer will not run under Windows 95/98/Me.[12] As of 2016 before the 3.0 release NSIS was available in the PortableApps format for Unicode 2.46.5 Rev 3 and ANSI 2.51.[13]

See also[edit]

References[edit]

  1. ^NSIS 1.x Version History - NSIS wiki
  2. ^'NSIS licence page'. NSIS.
  3. ^'Users - NSIS'.
  4. ^Winamp 2.60 released, From Betanews, 2000-02-14, Tweakers, ..namely featuring a new 'SuperPiMP' installation system..
  5. ^SourceForge.net Project of the Month in January 2006
  6. ^'OpenCandy Installer Platform Comparison'. Archived from the original on 27 June 2011. Retrieved 27 June 2011.CS1 maint: BOT: original-url status unknown (link)
  7. ^ ab'Features'. NSIS.
  8. ^'installerUsage'. NSIS.
  9. ^'Unicode plug-in'. NSIS.
  10. ^'Unicode NSIS Project Page'.
  11. ^'Unicode NSIS Project Users'.
  12. ^'NSIS Users Manual Chapter 1'. NSIS. Retrieved 26 May 2015.
  13. ^'NSIS Portable'. PortableApps.com. 19 May 2016. Retrieved 4 July 2016.

External links[edit]

Wikimedia Commons has media related to Nullsoft Scriptable Install System.
  • Official website
  • NSIS on SourceForge.net
  • NSIS at Open Hub
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&oldid=936695282'

NSIS 2 makes it is possible to create installers with a custom user interface. The Modern UI is an interface with a style like the wizards of recent Windows versions.

This new interface also features new pages (Welcome, Finish, Start Menu) and a description area on the components page. The interface and the graphics can be customized using the provided settings.

Using the Modern UI macros and language files, writing scripts with a modern interface is easy. This document contains information about writing Modern UI scripts and a reference of all settings.

Important: Because the Modern UI has its own macro system, its own default settings and a lot of new features, the interface configuration works differently. So you should not use commands like LicenseText, Icon, CheckBitmap, InstallColors etc.

Screenshots

The Modern UI has a macro system, so all the code to control the interface has already been written for you.

If you want to start a new Modern UI script or upgrade an older script with the Classic UI, follow the steps below.

Taking a look at the example scripts will also help you to learn more about the Modern UI.

Syntax

Some defines (e.g. MUI_COMPONENTSPAGE_SMALLDESC) don't need a value, they are true/false settings. Others (e.g. MUI_UI) can be used to define a specific value.

Parameters are specified in this format: required (option1 option2) [optional]

Parameters for defined settings should be in one string:

If you want a certain value (e.g. a text) to be language-specific, set a language string (using LangString) and define $(STRINGNAME) as value. Use a license language string (LicenseLangString) for the license text.

If you want to add ' to a Modern UI string, you should always escape it using $' because the Modern UI macros use ' to separate parameters.

1. Header file

MUI.nsh is in the Include directory, so you don't have to specify a path.

2. Interface Configuration

Interface settings should be set before inserting page macros. Page interface settings apply to all pages of a certain type.

Interface Settings

General Interface Settings

MUI_ICONicon_file
The icon for the installer.
Default: ${NSISDIR}ContribGraphicsIconsmodern-install.ico

Modern

MUI_UNICONicon_file
The icon for the uninstaller.
Default: ${NSISDIR}ContribGraphicsIconsmodern-uninstall.ico

MUI_HEADERIMAGE
Display an image on the header of the page.

MUI_HEADERIMAGE_BITMAPbmp_file
Bitmap image to display on the header of installers pages (recommended size: 150x57 pixels).
Default: ${NSISDIR}ContribGraphicsHeadernsis.bmp

MUI_HEADERIMAGE_BITMAP_NOSTRETCH
Do not stretch the installer header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_BITMAP_RTLbmp_file
Bitmap image to display on the header of installers pages when using a RTL language (recommended size: 150x57 pixels).
Default: Non-RTL bitmap

MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
Do not stretch the installer header bitmap when using a RTL language to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_UNBITMAPbmp_file
Bitmap image to display on the header of uninstaller pages (recommended size: 150x57 pixels).
Default: Installer header bitmap

MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH
Do not stretch the uninstaller header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_UNBITMAP_RTLbmp_file
Bitmap image to display on the header of uninstallers pages when using a RTL language (recommended size: 150x57 pixels).
Default: Installer RTL header bitmap

MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH
Do not stretch the uninstaller header bitmap when using a RTL language to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

MUI_HEADERIMAGE_RIGHT
Display the header image on the right side instead of the left side (when using a RTL language it will be displayed on the left side instead of the right side).

MUI_BGCOLOR(color: RRGGBBR hexadecimal)
Background color for the header, the Welcome page and the Finish page.
Default: FFFFFF

MUI_HEADER_TRANSPARENT_TEXT
Set a transparent background for the header's label controls. Useful for custom user interfaces that set a bigger header image.

Interface Resource Settings

MUI_UIui_file
The interface file with the dialog resources. Change this if you have made your own customized UI.
Default: ${NSISDIR}ContribUIsmodern.exe

MUI_UI_HEADERIMAGEui_file
The interface files with the dialog resource IDD_INST that contains a bitmap control and space for the header bitmap.
Default: ${NSISDIR}ContribUIsmodern_headerbmp.exe

MUI_UI_HEADERIMAGE_RIGHTui_file
The interface files with the dialog resource IDD_INST that contains a bitmap control and space for the header bitmap on the right side.
Default: ${NSISDIR}ContribUIsmodern_headerbmpr.exe

MUI_UI_COMPONENTSPAGE_SMALLDESCui_file
The interface files with a customized dialog resource IDD_SELCOM with a small description area.
Default: ${NSISDIR}ContribUIsmodern_smalldesc.exe

Xtgem de n gage 2.0 cracked games. MUI_UI_COMPONENTSPAGE_NODESCui_file
The interface files with a customized dialog resource IDD_SELCOM without a description area.
Default: ${NSISDIR}ContribUIsmodern_nodesc.exe

Welcome/Finish Page Interface Settings

MUI_WELCOMEFINISHPAGE_BITMAPbmp_file
Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).
Default: ${NSISDIR}ContribGraphicsWizardwin.bmp

MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

Welcome/Finish Page InstallOptions INI Settings

MUI_WELCOMEFINISHPAGE_INIini_file
InstallOptions INI file for the Welcome page and the Finish page.
Default: ${NSISDIR}ContribModern UIioSpecial.ini

Uninstaller Welcome/Finish Page Settings

MUI_UNWELCOMEFINISHPAGE_BITMAPbmp_file
Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).
Default: ${NSISDIR}ContribGraphicsWizardwin.bmp

MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

Uninstaller Welcome/Finish Page Interface INI Settings

MUI_UNWELCOMEFINISHPAGE_INIini_file
InstallOptions INI file for the uninstaller Welcome page and the Finish page.
Default: ${NSISDIR}ContribModern UIioSpecial.ini

License Page Interface Settings

MUI_LICENSEPAGE_BGCOLOR(/windows /grey (color: RRGGBB hexadecimal))
The background color for the license textbox. Use /windows for the Windows text background color (usually white). Use the /grey for the window background color (usually grey).
Default: /windows

Components Page Interface Settings

MUI_COMPONENTSPAGE_CHECKBITMAPbitmap_file
The bitmap with images for the checks of the component select treeview.
Default: ${NSISDIR}ContribGraphicsChecksmodern.bmp

MUI_COMPONENTSPAGE_SMALLDESC
A small description area on the bottom of the page. Use this layout if you have a lot of sections and don't need large descriptions.

MUI_COMPONENTSPAGE_NODESC
No description area.

Installation Page Interface Settings

MUI_INSTFILESPAGE_COLORS(/windows (foreground color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal))
The colors of the details screen. Use /windows for the default Windows colors.
Default: /windows

MUI_INSTFILESPAGE_PROGRESSBAR(' colored smooth)
The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.
Default: smooth

Installer Finish Page Interface Settings

MUI_FINISHPAGE_NOAUTOCLOSE
Do not automatically jump to the finish page, to allow the user to check the install log.

Uninstaller Finish Page Interface Settings

MUI_UNFINISHPAGE_NOAUTOCLOSE
Do not automatically jump to the finish page, to allow the user to check the uninstall log.

Abort Warning Settings

MUI_ABORTWARNING
Show a message box with a warning when the user wants to close the installer.

MUI_ABORTWARNING_TEXTtext
Text to display on the abort warning messagebox.

Uninstaller Abort Warning Settings

MUI_UNABORTWARNING
Show a message box with a warning when the user wants to close the uninstaller.

MUI_UNABORTWARNING_TEXTtext
Text to display on the abort warning messagebox.

3. Pages

Insert the following macros to set the pages you want to use. The pages will appear in the order you insert them in your script. You can also insert custom Page commands between the macros to add custom pages. More info about custom pages..

You can add multiple pages of certain types (for example, if you want the user to specify multiple folders).

Examples:

You will need the page ID for the Start Menu Folder page when using the Start Menu Folder macros. The Start Menu Folder will be stored in the specified variable.

Installer Pages
MUI_PAGE_WELCOME
MUI_PAGE_LICENSE text/rtf_file
MUI_PAGE_COMPONENTS
MUI_PAGE_DIRECTORY
MUI_PAGE_STARTMENU page_id variable
MUI_PAGE_INSTFILES
MUI_PAGE_FINISH

Uninstaller Pages
MUI_UNPAGE_WELCOME
MUI_UNPAGE_CONFIRM
MUI_UNPAGE_LICENSE text/rtf_file
MUI_UNPAGE_COMPONENTS
MUI_UNPAGE_DIRECTORY
MUI_UNPAGE_INSTFILES
MUI_UNPAGE_FINISH

Page Settings

Page Settings apply to a single page and should be set before inserting a page macro. If you have multiple pages of one type and you want to set a setting for all them, put the setting before each page macro. Example:

Note: There is no difference between installer and uninstaller page settings.

General Page Settings

MUI_PAGE_HEADER_TEXTtext
Text to display on the header of the page.

MUI_PAGE_HEADER_SUBTEXTtext
Subtext to display on the header of the page.

Welcome Page Settings

MUI_WELCOMEPAGE_TITLEtitle
Title to display on the top of the page.

MUI_WELCOMEPAGE_TITLE_3LINES
Extra space for the title area.

MUI_WELCOMEPAGE_TEXTtext
Text to display on the page. Use rn for a newline.

License Page Settings

MUI_LICENSEPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_LICENSEPAGE_TEXT_BOTTOMtext
Text to display on the bottom of the page.

MUI_LICENSEPAGE_BUTTONbutton_text
Text to display on the 'I Agree' button.

MUI_LICENSEPAGE_CHECKBOX
Display a checkbox the user has to check to agree with the license terms.

MUI_LICENSEPAGE_CHECKBOX_TEXTtext
Text to display next to the checkbox to agree with the license terms.

MUI_LICENSEPAGE_RADIOBUTTONS
Display two radio buttons to allow the user to choose between accepting the license terms or not.

MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPTtext
Text to display next to the checkbox to accept the license terms.

MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINEtext
Text to display next to the checkbox to decline the license terms.

Components Page Settings

MUI_COMPONENTSPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_COMPONENTSPAGE_TEXT_COMPLISTtext
Text to display on next to the components list.

MUI_COMPONENTSPAGE_TEXT_INSTTYPEtext
Text to display on next to the installation type combo box.

MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLEtext
Text to display on the of the top of the description box.

MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFOtext
Text to display inside the description box when no section is selected.

Directory Page Settings

MUI_DIRECTORYPAGE_TEXT_TOPtext
Text to display on top of the page.

MUI_DIRECTORYPAGE_TEXT_DESTINATIONtext
Text to display on the destination folder frame.

MUI_DIRECTORYPAGE_VARIABLEvariable
Variable in which to store the selected folder.
Default: $INSTDIR

MUI_DIRECTORYPAGE_VERIFYONLEAVE
Does not disable the Next button when a folder is invalid but allows you to use GetInstDirError in the leave function to handle an invalid folder.

Start Menu Folder Page Settings

Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros:

The page ID should be the ID of the page on which the user has selected the folder for the shortcuts you want to write.

MUI_STARTMENUPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_STARTMENUPAGE_TEXT_CHECKBOXtext
Text to display next to the checkbox to disable the Start Menu folder creation.

MUI_STARTMENUPAGE_DEFAULTFOLDERfolder
The default Start Menu Folder.

MUI_STARTMENUPAGE_NODISABLE
Do not display the checkbox to disable the creation of Start Menu shortcuts.

MUI_STARTMENUPAGE_REGISTRY_ROOTroot
MUI_STARTMENUPAGE_REGISTRY_KEYkey
MUI_STARTMENUPAGE_REGISTRY_VALUENAMEvalue_name
The registry key to store the Start Menu folder. The page will use it to remember the users preference. You should also use for the uninstaller to remove the Start Menu folders. Don't forget to remove this key during uninstallation.

For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu folder:

Installation Page Settings

MUI_INSTFILESPAGE_FINISHHEADER_TEXTtext
Text to display on the header of the installation page when the installation has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).

MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXTtext
Subtext to display on the header of the installation page when the installation has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).

MUI_INSTFILESPAGE_ABORTHEADER_TEXTtext
Text to display on the header of the installation page when the installation has been aborted.

MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXTtext
Subext to display on the header of the installation page when the installation has been aborted.

Finish Page Settings

MUI_FINISHPAGE_TITLEtitle
Title to display on the top of the page.

MUI_FINISHPAGE_TITLE_3LINES
Extra space for the title area.

MUI_FINISHPAGE_TEXTtext
Text to display on the page. Use rn for a newline.

MUI_FINISHPAGE_TEXT_LARGE
Extra space for the text area (if using checkboxes).

MUI_FINISHPAGE_BUTTONtext
Text to display on the Finish button.

MUI_FINISHPAGE_TEXT_REBOOTtext
Text to display on the finish page when asking for a system reboot. Use rn for a newline.

MUI_FINISHPAGE_TEXT_REBOOTNOWtext
Text to display next to the 'Reboot now' option button.

MUI_FINISHPAGE_TEXT_REBOOTLATERtext
Text to display next to the 'Reboot later' option button.

MUI_FINISHPAGE_RUNexe_file
Application which the user can select to run using a checkbox. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_RUN_TEXTtext
Texts to display next to the 'Run program' checkbox.

MUI_FINISHPAGE_RUN_PARAMETERSparameters
Parameters for the application to run. Don't forget to escape double quotes in the value (use $').

MUI_FINISHPAGE_RUN_NOTCHECKED
Do not check the 'Run program' checkbox by default

MUI_FINISHPAGE_RUN_FUNCTIONfunction_name
Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without parameters). You can use the function to execute multiple applications or you can change the checkbox name and use it for other things.

MUI_FINISHPAGE_SHOWREADMEfile/url
File or website which the user can select to view using a checkbox. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_SHOWREADME_TEXTtext
Texts to display next to the 'Show Readme' checkbox.

MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
Do not check the 'Show Readme' checkbox by default

MUI_FINISHPAGE_SHOWREADME_FUNCTIONfunction_name
Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without parameters). You can use the function to show multiple files or you can change the checkbox name and use it for other things.

MUI_FINISHPAGE_LINKlink_text
Text for a link on the which the user can click to view a website or file.

MUI_FINISHPAGE_LINK_LOCATIONfile/url
Website or file which the user can select to view using the link. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_LINK_COLOR(color: RRGGBB hexadecimal)
Text color for the link on the Finish page.
Default: 000080

MUI_FINISHPAGE_NOREBOOTSUPPORT
Disables support for the page that allows the user to reboot the system. Define this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.

Uninstall Confirm Page Settings

MUI_UNCONFIRMPAGE_TEXT_TOPtext
Text to display on the top of the page.

MUI_UNCONFIRMPAGE_TEXT_LOCATIONtext
Text to display next to the uninstall location text box.

Advanced Page Settings

You can add custom code to the page functions of your Modern UI pages. More info..

4. Custom functions

If you want add your own code to functions inserted by the Modern UI (e.g. the .onGUIInit function and the page functions), create your own function and let the Modern UI functions call them.

5. Language files

Insert the Modern UI language files for the languages to want to include.

The Modern UI language files load the NLF language files, so you should not use LoadLanguageFile.

Language Selection Dialog

If you want the installer to display a language selection dialog (have a look at the MultiLanguage.nsi example), insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:

You can also use this macro for the uninstaller, in the un.onInit function.

Language Selection Dialog Settings

To remember the user's preference, you can define a registry key.
Note: These defines should be set before inserting the installation page macro.

MUI_LANGDLL_REGISTRY_ROOTroot
MUI_LANGDLL_REGISTRY_KEYkey
MUI_LANGDLL_REGISTRY_VALUENAMEvalue_name
The registry key to store the language. The users preference will be remembered. You can also use it for the uninstaller to display the right language. Don't forget to remove this key in the uninstaller.

For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the stored language preference:

Language Selection Dialog Interface Settings

To customize the language selection dialog interface, use these defines before inserting the MUI_LANGDLL_DISPLAY macro.

MUI_LANGDLL_WINDOWTITLEtext
The window title of the language selection dialog.

MUI_LANGDLL_INFOtext
The text to display on the language selection dialog.

MUI_LANGDLL_ALWAYSSHOW
Always show the language selection dialog, even if a language has been stored in the registry. The language stored in the registry will be selected by default.

6. Reserve files

If you are using solid compression, it's important that files which are being extracted in init- or page functions function are located before other files in the data block, because this will make your installer faster.

If there are File commands in your sections or functions above the init- or page functions, add the reserve file macros above your sections and functions.

7. Your own sections and functions

Add your installer sections and functions. See the NSIS Users Manual for details.

Information about section code and function code for Start Menu shortcut creation and language selection can be found above.

8. Section descriptions

The descriptions of sections will be displayed on the components page, when the user hovers the mouse over a section. If you don't want to use descriptions, use the MUI_COMPONENTSPAGE_NODESC interface setting.

To set a description for a section, you have to add an additional parameter to the Section commmand with a name for the define that should contain the section number.

Use these macros to set the descriptions:

For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END macros.

If you want add your custom pages to your installer, you should insert your own page commands between the page macros.

Using InstallOptions for custom pages

InstallOptions is a plug-in that displays custom pages that you can create using INI files.

Have a look at the InstallOptions documentation for info about creating InstallOptions INI files.

First, you have to extract your InstallOptions INI File in the .onInit function (un.onInit for the uninstaller) using the MUI_INSTALLOPTIONS_EXTRACT macro:

If your INI File is located in another directory, use MUI_INSTALLOPTIONS_EXTRACT_AS. The second parameter is the filename for the temporary plug-ins directory, use this filename as parameter for the other InstallOptions macros.

You can call Instal Options in the function defined with the Page or UninstPage command using the MUI_INSTALLOPTIONS_DISPLAY macro. Use the MUI_HEADER_TEXT macro to set the text on the page header:

For custom fonts and colors, macros for the initDialog and show functions of InstallOptions are also available:

If you need the InstallOptions return value (success, back, cancel, error), use the MUI_INSTALLOPTIONS_DISPLAY_RETURN or MUI_INSTALLOPTIONS_SHOW_RETURN macro. The return value will be added to the stack, so you can use the Pop command to get it.

Use these macros to read or write INI file values:

For example, you can use the MUI_INSTALLOPTIONS_READ macro in a section to get the user input:

For more details about InstallOptions, validation of user input etc., check the InstallOptions documentation.

Customize standard dialogs

To change elements on the dialogs, use customized UI resource files (see Interface Configuration). You can change your copies of the original files (in the ContribUIs folder) by using an application such as Resource Hacker.

The 'Please wait while Setup is loading..' text on the splash screen that is being displayed while the installer is starting (Verifying installer, Unpacking data) can be changed by using a customized UI resource file (MUI_UI setting) with a modified dialog 111.
The 'Verifying installer' and 'Unpacking data' texts are defined in the language header file of the NSIS exehead (Sourceexeheadlang.h). To change them, you have to edit this file and recompile NSIS.

To modify the Welcome dialog and Finish dialog, use a custom INI file (MUI_SPECIALINI setting) or write to the INI file in the custom page functions.

If you want add your own code to functions inserted by the Modern UI, such as the .onGUIInit function and the Page functions, create your own function and let the Modern UI functions call them. Use the defines to define the name of your functions.

Example:

General Custom Functions

These defines should be set before inserting the language macros.

MUI_CUSTOMFUNCTION_GUIINITfunction
MUI_CUSTOMFUNCTION_UNGUIINITfunction
MUI_CUSTOMFUNCTION_ABORTfunction
MUI_CUSTOMFUNCTION_UNABORTfunction

Page Custom Functions

These defines should be set before inserting a page macro.

MUI_PAGE_CUSTOMFUNCTION_PREfunction
MUI_PAGE_CUSTOMFUNCTION_SHOWfunction
MUI_PAGE_CUSTOMFUNCTION_LEAVEfunction

Notes:

  • In the Pre function of the Welcome page and the Finish page, you can write to the InstallOptions INI file of the page (ioSpecial.ini)
  • In the Show function of the Welcome, Finish and StartMenu pages, $MUI_HWND contains the HWND of the inner dialog

Welcome/Finish Page Custom Functions

This define should be inserted before a single Welcome or Finish page.

MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INITfunction

This Init function is called before the InstallOptions INI file for the page is written, so you can use it to initialize any variables used in the page settings.

Basic: Basic.nsi
Welcome/Finish page: WelcomeFinish.nsi
Multiple languages: MultiLanguage.nsi
Header image: HeaderBitmap.nsi
Custom pages: InstallOptions.nsi
Start Menu Folder page: StartMenu.nsi

  • 1.75 - April 1, 2006
    • Added show function for the start menu page
    • Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts

Made by Joost Verburg.
Icons designed by Nikos Adamamas, aka adni18.
Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.

The zlib/libpng license applies to the Modern UI.

License Terms

©2002-2006 Joost Verburg
...">Nsis Modern Ui Installer Icon(11.03.2020)
  • Nsis Modern Ui Installer Icon Average ratng: 3,5/5 2433 votes
  • Nullsoft Scriptable Install System
    Original author(s)Nullsoft
    Developer(s)NSIS Team and NSIS Community
    Initial release31 July 2001; 18 years ago[1]
    Stable release
    3.05 / 16 December 2019; 2 months ago
    Repository
    Written inC, C++
    Operating systemWindows, Mac OS X
    TypeSoftware development tools
    Licensezlib License
    Websitensis.sourceforge.io

    Nullsoft Scriptable Install System (NSIS) is a script-driven installer authoring tool for Microsoft Windows backed by Nullsoft, the creators of Winamp. NSIS is released under a combination of free software licenses, primarily the zlib license.[2] It has become a widely used alternative to commercialproprietary products like InstallShield, with users including Amazon.com, Dropbox, Google, Ubisoft, FL Studio, BitTorrent, and McAfee.[3]Driver bam huawei e3531 firmware free.

    History[edit]

    NSIS was created to distribute Winamp.[4] It is based on a previous Nullsoft product, PiMP (plugin Mini Packager), and is also known as SuperPiMP. After version 2.0a0, the project was moved to SourceForge where developers outside Nullsoft started working on it on a regular basis. NSIS 2.0 was released approximately two years later.

    The Modern UI provides a user interface for NSIS installers with a modern wizard style, similar to the wizards of recent Windows versions. It is based on the basic user interface that is provided by the NSIS compiler itself and extends it with more interface features and pages.

    NSIS version 1 is in many ways similar to the classic Windows Installer, but it supports more compression formats. NSIS version 2 features a new streamlined graphical user interface and supports LZMA compression, multiple languages, and an easy-to-use plugin system.

    In January 2006 NSIS was SourceForge's project of the month.[5][6]

    Script examples[edit]

    Hello world![edit]

    Simple installer[edit]

    Concepts[edit]

    NSIS 1.98

    Script[edit]

    The NSIS compiler program makensis compiles scripts like the following example into executable installation programs. Each line in the script contains a single command.

    Modern user interface[edit]

    Version 2.0 introduced a new optional streamlined graphical user interface called Modern UI (MUI). The MUI has a wizard-like interface. It supports a welcome page, finish page, language selection dialog, description area for components, and greater customization options than the old user interface.

    Since NSIS version 2.30 (Released on 25 August 2007) there is new version (beta) of this UI accessible: Modern UI 2 (MUI2) which is an enhancement to Modern UI. Unlike the old MUI this version is based on nsDialogs instead of old-fashioned InstallOptions .ini files.

    From version 2.34 (Released on 24 December 2007) this MUI2 is ready for mass consumption and it is included in all NSIS packages. Also all examples had been switched to it.

    Modern UI 2 documentation.

    Graphical interfaces[edit]

    NSIS projects can be configured by simply editing text files (with .nsi extension). However, several third parties provide editing software:

    • EclipseNSIS is a module for the Eclipse platform. It allows NSIS scripts to be edited, compiled and validated.
    • HM NIS Edit (freeware) editor with support of custom C++ or Delphi plug-ins.
    • Venis (freeware) editor
    • Visual & Installer is an add-in which integrates NSIS with Microsoft Visual Studio IDE and allows to create and build NSIS projects right within it.

    Installer interfaces[edit]

    Several projects that extend or replace the Modern UI have started in the past few years. Interfaces such as the ExperienceUI and UltraModernUI completely change the style of the installer by skinning it to look like the InstallShield interface. Other interfaces like installSpiderUI aim for a more minimalistic approach on the visual side of things while maintaining the same level of functionality as the ASD.

    Plugins[edit]

    NSIS can be extended with plugins that can communicate with the installer. Plugins can be written in any unmanaged programming language capable of building a dynamic-link library (such as C, C++ or Delphi), and they can be used to perform installation tasks or extend the installer interface. A plugin can be called with a single line of NSIS code.

    Several plugins come with the NSIS package that permit the installer to display a splash screen, display a custom page, display an image on the background, download files from a website, perform mathematical operations, patch files and more.

    Other plugins are available online, including ZipDLL, and a Python plugin.

    Features[edit]

    NSIS supports the following features:[7]

    • zlib, bzip2, and LZMA compression
    • Script-based
    • Multilingual
    • Plugin support
    • Script preprocessor

    Generated installer[edit]

    The generated installer is a Portable Executable, with the installation files archived within the installer, a 34 KB overhead for the NSIS installer,[7] and the installation script compiled into executable code. As the installation script is compiled, the script cannot be obtained from the delivered executable without reverse-engineering the binary.

    The archive may be unpacked using 7-Zip, the Total Commander plugin InstallExplorer, or the FAR Manager plugin InstallExplorer.

    The archive contains several folders:

    • $PLUGINSDIR : installation routine plugins
    • $INSTDIR : files used during the installation
    • $_OUTDIR : files to be installed.

    The generated installer includes command line arguments in order to give users more control:[8]

    • /NCRC disables the CRC check, unless the script forces it
    • /S runs the installer/uninstaller silently.
    • /D sets the default installation directory. It must be the last parameter and must not contain any quotes. Only absolute paths are supported.

    Unicode support[edit]

    Versions of NSIS before 3.0 did not support Unicode, but only a means to convert some files to different encodings via a plugin.[9] However, a variant of NSIS that has full Unicode support is available.[10] Notable projects using this variant are:[11]

    • Google (Picasa)
    • Apache OpenOffice for Windows
    • Mozilla (Firefox, Mozilla Thunderbird)

    With the release of version 3.0 of NSIS, Unicode support can be implemented using the compiler directive 'Unicode true'. This gives full Unicode support with no further code changes, but the installer will not run under Windows 95/98/Me.[12] As of 2016 before the 3.0 release NSIS was available in the PortableApps format for Unicode 2.46.5 Rev 3 and ANSI 2.51.[13]

    See also[edit]

    References[edit]

    1. ^NSIS 1.x Version History - NSIS wiki
    2. ^'NSIS licence page'. NSIS.
    3. ^'Users - NSIS'.
    4. ^Winamp 2.60 released, From Betanews, 2000-02-14, Tweakers, ..namely featuring a new 'SuperPiMP' installation system..
    5. ^SourceForge.net Project of the Month in January 2006
    6. ^'OpenCandy Installer Platform Comparison'. Archived from the original on 27 June 2011. Retrieved 27 June 2011.CS1 maint: BOT: original-url status unknown (link)
    7. ^ ab'Features'. NSIS.
    8. ^'installerUsage'. NSIS.
    9. ^'Unicode plug-in'. NSIS.
    10. ^'Unicode NSIS Project Page'.
    11. ^'Unicode NSIS Project Users'.
    12. ^'NSIS Users Manual Chapter 1'. NSIS. Retrieved 26 May 2015.
    13. ^'NSIS Portable'. PortableApps.com. 19 May 2016. Retrieved 4 July 2016.

    External links[edit]

    Wikimedia Commons has media related to Nullsoft Scriptable Install System.
    • Official website
    • NSIS on SourceForge.net
    • NSIS at Open Hub
    Retrieved from 'https://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&oldid=936695282'

    NSIS 2 makes it is possible to create installers with a custom user interface. The Modern UI is an interface with a style like the wizards of recent Windows versions.

    This new interface also features new pages (Welcome, Finish, Start Menu) and a description area on the components page. The interface and the graphics can be customized using the provided settings.

    Using the Modern UI macros and language files, writing scripts with a modern interface is easy. This document contains information about writing Modern UI scripts and a reference of all settings.

    Important: Because the Modern UI has its own macro system, its own default settings and a lot of new features, the interface configuration works differently. So you should not use commands like LicenseText, Icon, CheckBitmap, InstallColors etc.

    Screenshots

    The Modern UI has a macro system, so all the code to control the interface has already been written for you.

    If you want to start a new Modern UI script or upgrade an older script with the Classic UI, follow the steps below.

    Taking a look at the example scripts will also help you to learn more about the Modern UI.

    Syntax

    Some defines (e.g. MUI_COMPONENTSPAGE_SMALLDESC) don't need a value, they are true/false settings. Others (e.g. MUI_UI) can be used to define a specific value.

    Parameters are specified in this format: required (option1 option2) [optional]

    Parameters for defined settings should be in one string:

    If you want a certain value (e.g. a text) to be language-specific, set a language string (using LangString) and define $(STRINGNAME) as value. Use a license language string (LicenseLangString) for the license text.

    If you want to add ' to a Modern UI string, you should always escape it using $' because the Modern UI macros use ' to separate parameters.

    1. Header file

    MUI.nsh is in the Include directory, so you don't have to specify a path.

    2. Interface Configuration

    Interface settings should be set before inserting page macros. Page interface settings apply to all pages of a certain type.

    Interface Settings

    General Interface Settings

    MUI_ICONicon_file
    The icon for the installer.
    Default: ${NSISDIR}ContribGraphicsIconsmodern-install.ico

    Modern

    MUI_UNICONicon_file
    The icon for the uninstaller.
    Default: ${NSISDIR}ContribGraphicsIconsmodern-uninstall.ico

    MUI_HEADERIMAGE
    Display an image on the header of the page.

    MUI_HEADERIMAGE_BITMAPbmp_file
    Bitmap image to display on the header of installers pages (recommended size: 150x57 pixels).
    Default: ${NSISDIR}ContribGraphicsHeadernsis.bmp

    MUI_HEADERIMAGE_BITMAP_NOSTRETCH
    Do not stretch the installer header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

    MUI_HEADERIMAGE_BITMAP_RTLbmp_file
    Bitmap image to display on the header of installers pages when using a RTL language (recommended size: 150x57 pixels).
    Default: Non-RTL bitmap

    MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
    Do not stretch the installer header bitmap when using a RTL language to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

    MUI_HEADERIMAGE_UNBITMAPbmp_file
    Bitmap image to display on the header of uninstaller pages (recommended size: 150x57 pixels).
    Default: Installer header bitmap

    MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH
    Do not stretch the uninstaller header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

    MUI_HEADERIMAGE_UNBITMAP_RTLbmp_file
    Bitmap image to display on the header of uninstallers pages when using a RTL language (recommended size: 150x57 pixels).
    Default: Installer RTL header bitmap

    MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH
    Do not stretch the uninstaller header bitmap when using a RTL language to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

    MUI_HEADERIMAGE_RIGHT
    Display the header image on the right side instead of the left side (when using a RTL language it will be displayed on the left side instead of the right side).

    MUI_BGCOLOR(color: RRGGBBR hexadecimal)
    Background color for the header, the Welcome page and the Finish page.
    Default: FFFFFF

    MUI_HEADER_TRANSPARENT_TEXT
    Set a transparent background for the header's label controls. Useful for custom user interfaces that set a bigger header image.

    Interface Resource Settings

    MUI_UIui_file
    The interface file with the dialog resources. Change this if you have made your own customized UI.
    Default: ${NSISDIR}ContribUIsmodern.exe

    MUI_UI_HEADERIMAGEui_file
    The interface files with the dialog resource IDD_INST that contains a bitmap control and space for the header bitmap.
    Default: ${NSISDIR}ContribUIsmodern_headerbmp.exe

    MUI_UI_HEADERIMAGE_RIGHTui_file
    The interface files with the dialog resource IDD_INST that contains a bitmap control and space for the header bitmap on the right side.
    Default: ${NSISDIR}ContribUIsmodern_headerbmpr.exe

    MUI_UI_COMPONENTSPAGE_SMALLDESCui_file
    The interface files with a customized dialog resource IDD_SELCOM with a small description area.
    Default: ${NSISDIR}ContribUIsmodern_smalldesc.exe

    Xtgem de n gage 2.0 cracked games. MUI_UI_COMPONENTSPAGE_NODESCui_file
    The interface files with a customized dialog resource IDD_SELCOM without a description area.
    Default: ${NSISDIR}ContribUIsmodern_nodesc.exe

    Welcome/Finish Page Interface Settings

    MUI_WELCOMEFINISHPAGE_BITMAPbmp_file
    Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).
    Default: ${NSISDIR}ContribGraphicsWizardwin.bmp

    MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
    Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

    Welcome/Finish Page InstallOptions INI Settings

    MUI_WELCOMEFINISHPAGE_INIini_file
    InstallOptions INI file for the Welcome page and the Finish page.
    Default: ${NSISDIR}ContribModern UIioSpecial.ini

    Uninstaller Welcome/Finish Page Settings

    MUI_UNWELCOMEFINISHPAGE_BITMAPbmp_file
    Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).
    Default: ${NSISDIR}ContribGraphicsWizardwin.bmp

    MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
    Do not stretch the bitmap for the Welcome and Finish page to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.

    Uninstaller Welcome/Finish Page Interface INI Settings

    MUI_UNWELCOMEFINISHPAGE_INIini_file
    InstallOptions INI file for the uninstaller Welcome page and the Finish page.
    Default: ${NSISDIR}ContribModern UIioSpecial.ini

    License Page Interface Settings

    MUI_LICENSEPAGE_BGCOLOR(/windows /grey (color: RRGGBB hexadecimal))
    The background color for the license textbox. Use /windows for the Windows text background color (usually white). Use the /grey for the window background color (usually grey).
    Default: /windows

    Components Page Interface Settings

    MUI_COMPONENTSPAGE_CHECKBITMAPbitmap_file
    The bitmap with images for the checks of the component select treeview.
    Default: ${NSISDIR}ContribGraphicsChecksmodern.bmp

    MUI_COMPONENTSPAGE_SMALLDESC
    A small description area on the bottom of the page. Use this layout if you have a lot of sections and don't need large descriptions.

    MUI_COMPONENTSPAGE_NODESC
    No description area.

    Installation Page Interface Settings

    MUI_INSTFILESPAGE_COLORS(/windows (foreground color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal))
    The colors of the details screen. Use /windows for the default Windows colors.
    Default: /windows

    MUI_INSTFILESPAGE_PROGRESSBAR(' colored smooth)
    The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.
    Default: smooth

    Installer Finish Page Interface Settings

    MUI_FINISHPAGE_NOAUTOCLOSE
    Do not automatically jump to the finish page, to allow the user to check the install log.

    Uninstaller Finish Page Interface Settings

    MUI_UNFINISHPAGE_NOAUTOCLOSE
    Do not automatically jump to the finish page, to allow the user to check the uninstall log.

    Abort Warning Settings

    MUI_ABORTWARNING
    Show a message box with a warning when the user wants to close the installer.

    MUI_ABORTWARNING_TEXTtext
    Text to display on the abort warning messagebox.

    Uninstaller Abort Warning Settings

    MUI_UNABORTWARNING
    Show a message box with a warning when the user wants to close the uninstaller.

    MUI_UNABORTWARNING_TEXTtext
    Text to display on the abort warning messagebox.

    3. Pages

    Insert the following macros to set the pages you want to use. The pages will appear in the order you insert them in your script. You can also insert custom Page commands between the macros to add custom pages. More info about custom pages..

    You can add multiple pages of certain types (for example, if you want the user to specify multiple folders).

    Examples:

    You will need the page ID for the Start Menu Folder page when using the Start Menu Folder macros. The Start Menu Folder will be stored in the specified variable.

    Installer Pages
    MUI_PAGE_WELCOME
    MUI_PAGE_LICENSE text/rtf_file
    MUI_PAGE_COMPONENTS
    MUI_PAGE_DIRECTORY
    MUI_PAGE_STARTMENU page_id variable
    MUI_PAGE_INSTFILES
    MUI_PAGE_FINISH

    Uninstaller Pages
    MUI_UNPAGE_WELCOME
    MUI_UNPAGE_CONFIRM
    MUI_UNPAGE_LICENSE text/rtf_file
    MUI_UNPAGE_COMPONENTS
    MUI_UNPAGE_DIRECTORY
    MUI_UNPAGE_INSTFILES
    MUI_UNPAGE_FINISH

    Page Settings

    Page Settings apply to a single page and should be set before inserting a page macro. If you have multiple pages of one type and you want to set a setting for all them, put the setting before each page macro. Example:

    Note: There is no difference between installer and uninstaller page settings.

    General Page Settings

    MUI_PAGE_HEADER_TEXTtext
    Text to display on the header of the page.

    MUI_PAGE_HEADER_SUBTEXTtext
    Subtext to display on the header of the page.

    Welcome Page Settings

    MUI_WELCOMEPAGE_TITLEtitle
    Title to display on the top of the page.

    MUI_WELCOMEPAGE_TITLE_3LINES
    Extra space for the title area.

    MUI_WELCOMEPAGE_TEXTtext
    Text to display on the page. Use rn for a newline.

    License Page Settings

    MUI_LICENSEPAGE_TEXT_TOPtext
    Text to display on the top of the page.

    MUI_LICENSEPAGE_TEXT_BOTTOMtext
    Text to display on the bottom of the page.

    MUI_LICENSEPAGE_BUTTONbutton_text
    Text to display on the 'I Agree' button.

    MUI_LICENSEPAGE_CHECKBOX
    Display a checkbox the user has to check to agree with the license terms.

    MUI_LICENSEPAGE_CHECKBOX_TEXTtext
    Text to display next to the checkbox to agree with the license terms.

    MUI_LICENSEPAGE_RADIOBUTTONS
    Display two radio buttons to allow the user to choose between accepting the license terms or not.

    MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPTtext
    Text to display next to the checkbox to accept the license terms.

    MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINEtext
    Text to display next to the checkbox to decline the license terms.

    Components Page Settings

    MUI_COMPONENTSPAGE_TEXT_TOPtext
    Text to display on the top of the page.

    MUI_COMPONENTSPAGE_TEXT_COMPLISTtext
    Text to display on next to the components list.

    MUI_COMPONENTSPAGE_TEXT_INSTTYPEtext
    Text to display on next to the installation type combo box.

    MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLEtext
    Text to display on the of the top of the description box.

    MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFOtext
    Text to display inside the description box when no section is selected.

    Directory Page Settings

    MUI_DIRECTORYPAGE_TEXT_TOPtext
    Text to display on top of the page.

    MUI_DIRECTORYPAGE_TEXT_DESTINATIONtext
    Text to display on the destination folder frame.

    MUI_DIRECTORYPAGE_VARIABLEvariable
    Variable in which to store the selected folder.
    Default: $INSTDIR

    MUI_DIRECTORYPAGE_VERIFYONLEAVE
    Does not disable the Next button when a folder is invalid but allows you to use GetInstDirError in the leave function to handle an invalid folder.

    Start Menu Folder Page Settings

    Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros:

    The page ID should be the ID of the page on which the user has selected the folder for the shortcuts you want to write.

    MUI_STARTMENUPAGE_TEXT_TOPtext
    Text to display on the top of the page.

    MUI_STARTMENUPAGE_TEXT_CHECKBOXtext
    Text to display next to the checkbox to disable the Start Menu folder creation.

    MUI_STARTMENUPAGE_DEFAULTFOLDERfolder
    The default Start Menu Folder.

    MUI_STARTMENUPAGE_NODISABLE
    Do not display the checkbox to disable the creation of Start Menu shortcuts.

    MUI_STARTMENUPAGE_REGISTRY_ROOTroot
    MUI_STARTMENUPAGE_REGISTRY_KEYkey
    MUI_STARTMENUPAGE_REGISTRY_VALUENAMEvalue_name
    The registry key to store the Start Menu folder. The page will use it to remember the users preference. You should also use for the uninstaller to remove the Start Menu folders. Don't forget to remove this key during uninstallation.

    For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu folder:

    Installation Page Settings

    MUI_INSTFILESPAGE_FINISHHEADER_TEXTtext
    Text to display on the header of the installation page when the installation has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).

    MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXTtext
    Subtext to display on the header of the installation page when the installation has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).

    MUI_INSTFILESPAGE_ABORTHEADER_TEXTtext
    Text to display on the header of the installation page when the installation has been aborted.

    MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXTtext
    Subext to display on the header of the installation page when the installation has been aborted.

    Finish Page Settings

    MUI_FINISHPAGE_TITLEtitle
    Title to display on the top of the page.

    MUI_FINISHPAGE_TITLE_3LINES
    Extra space for the title area.

    MUI_FINISHPAGE_TEXTtext
    Text to display on the page. Use rn for a newline.

    MUI_FINISHPAGE_TEXT_LARGE
    Extra space for the text area (if using checkboxes).

    MUI_FINISHPAGE_BUTTONtext
    Text to display on the Finish button.

    MUI_FINISHPAGE_TEXT_REBOOTtext
    Text to display on the finish page when asking for a system reboot. Use rn for a newline.

    MUI_FINISHPAGE_TEXT_REBOOTNOWtext
    Text to display next to the 'Reboot now' option button.

    MUI_FINISHPAGE_TEXT_REBOOTLATERtext
    Text to display next to the 'Reboot later' option button.

    MUI_FINISHPAGE_RUNexe_file
    Application which the user can select to run using a checkbox. You don't need to put quotes around the filename when it contains spaces.

    MUI_FINISHPAGE_RUN_TEXTtext
    Texts to display next to the 'Run program' checkbox.

    MUI_FINISHPAGE_RUN_PARAMETERSparameters
    Parameters for the application to run. Don't forget to escape double quotes in the value (use $').

    MUI_FINISHPAGE_RUN_NOTCHECKED
    Do not check the 'Run program' checkbox by default

    MUI_FINISHPAGE_RUN_FUNCTIONfunction_name
    Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without parameters). You can use the function to execute multiple applications or you can change the checkbox name and use it for other things.

    MUI_FINISHPAGE_SHOWREADMEfile/url
    File or website which the user can select to view using a checkbox. You don't need to put quotes around the filename when it contains spaces.

    MUI_FINISHPAGE_SHOWREADME_TEXTtext
    Texts to display next to the 'Show Readme' checkbox.

    MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
    Do not check the 'Show Readme' checkbox by default

    MUI_FINISHPAGE_SHOWREADME_FUNCTIONfunction_name
    Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without parameters). You can use the function to show multiple files or you can change the checkbox name and use it for other things.

    MUI_FINISHPAGE_LINKlink_text
    Text for a link on the which the user can click to view a website or file.

    MUI_FINISHPAGE_LINK_LOCATIONfile/url
    Website or file which the user can select to view using the link. You don't need to put quotes around the filename when it contains spaces.

    MUI_FINISHPAGE_LINK_COLOR(color: RRGGBB hexadecimal)
    Text color for the link on the Finish page.
    Default: 000080

    MUI_FINISHPAGE_NOREBOOTSUPPORT
    Disables support for the page that allows the user to reboot the system. Define this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.

    Uninstall Confirm Page Settings

    MUI_UNCONFIRMPAGE_TEXT_TOPtext
    Text to display on the top of the page.

    MUI_UNCONFIRMPAGE_TEXT_LOCATIONtext
    Text to display next to the uninstall location text box.

    Advanced Page Settings

    You can add custom code to the page functions of your Modern UI pages. More info..

    4. Custom functions

    If you want add your own code to functions inserted by the Modern UI (e.g. the .onGUIInit function and the page functions), create your own function and let the Modern UI functions call them.

    5. Language files

    Insert the Modern UI language files for the languages to want to include.

    The Modern UI language files load the NLF language files, so you should not use LoadLanguageFile.

    Language Selection Dialog

    If you want the installer to display a language selection dialog (have a look at the MultiLanguage.nsi example), insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:

    You can also use this macro for the uninstaller, in the un.onInit function.

    Language Selection Dialog Settings

    To remember the user's preference, you can define a registry key.
    Note: These defines should be set before inserting the installation page macro.

    MUI_LANGDLL_REGISTRY_ROOTroot
    MUI_LANGDLL_REGISTRY_KEYkey
    MUI_LANGDLL_REGISTRY_VALUENAMEvalue_name
    The registry key to store the language. The users preference will be remembered. You can also use it for the uninstaller to display the right language. Don't forget to remove this key in the uninstaller.

    For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the stored language preference:

    Language Selection Dialog Interface Settings

    To customize the language selection dialog interface, use these defines before inserting the MUI_LANGDLL_DISPLAY macro.

    MUI_LANGDLL_WINDOWTITLEtext
    The window title of the language selection dialog.

    MUI_LANGDLL_INFOtext
    The text to display on the language selection dialog.

    MUI_LANGDLL_ALWAYSSHOW
    Always show the language selection dialog, even if a language has been stored in the registry. The language stored in the registry will be selected by default.

    6. Reserve files

    If you are using solid compression, it's important that files which are being extracted in init- or page functions function are located before other files in the data block, because this will make your installer faster.

    If there are File commands in your sections or functions above the init- or page functions, add the reserve file macros above your sections and functions.

    7. Your own sections and functions

    Add your installer sections and functions. See the NSIS Users Manual for details.

    Information about section code and function code for Start Menu shortcut creation and language selection can be found above.

    8. Section descriptions

    The descriptions of sections will be displayed on the components page, when the user hovers the mouse over a section. If you don't want to use descriptions, use the MUI_COMPONENTSPAGE_NODESC interface setting.

    To set a description for a section, you have to add an additional parameter to the Section commmand with a name for the define that should contain the section number.

    Use these macros to set the descriptions:

    For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END macros.

    If you want add your custom pages to your installer, you should insert your own page commands between the page macros.

    Using InstallOptions for custom pages

    InstallOptions is a plug-in that displays custom pages that you can create using INI files.

    Have a look at the InstallOptions documentation for info about creating InstallOptions INI files.

    First, you have to extract your InstallOptions INI File in the .onInit function (un.onInit for the uninstaller) using the MUI_INSTALLOPTIONS_EXTRACT macro:

    If your INI File is located in another directory, use MUI_INSTALLOPTIONS_EXTRACT_AS. The second parameter is the filename for the temporary plug-ins directory, use this filename as parameter for the other InstallOptions macros.

    You can call Instal Options in the function defined with the Page or UninstPage command using the MUI_INSTALLOPTIONS_DISPLAY macro. Use the MUI_HEADER_TEXT macro to set the text on the page header:

    For custom fonts and colors, macros for the initDialog and show functions of InstallOptions are also available:

    If you need the InstallOptions return value (success, back, cancel, error), use the MUI_INSTALLOPTIONS_DISPLAY_RETURN or MUI_INSTALLOPTIONS_SHOW_RETURN macro. The return value will be added to the stack, so you can use the Pop command to get it.

    Use these macros to read or write INI file values:

    For example, you can use the MUI_INSTALLOPTIONS_READ macro in a section to get the user input:

    For more details about InstallOptions, validation of user input etc., check the InstallOptions documentation.

    Customize standard dialogs

    To change elements on the dialogs, use customized UI resource files (see Interface Configuration). You can change your copies of the original files (in the ContribUIs folder) by using an application such as Resource Hacker.

    The 'Please wait while Setup is loading..' text on the splash screen that is being displayed while the installer is starting (Verifying installer, Unpacking data) can be changed by using a customized UI resource file (MUI_UI setting) with a modified dialog 111.
    The 'Verifying installer' and 'Unpacking data' texts are defined in the language header file of the NSIS exehead (Sourceexeheadlang.h). To change them, you have to edit this file and recompile NSIS.

    To modify the Welcome dialog and Finish dialog, use a custom INI file (MUI_SPECIALINI setting) or write to the INI file in the custom page functions.

    If you want add your own code to functions inserted by the Modern UI, such as the .onGUIInit function and the Page functions, create your own function and let the Modern UI functions call them. Use the defines to define the name of your functions.

    Example:

    General Custom Functions

    These defines should be set before inserting the language macros.

    MUI_CUSTOMFUNCTION_GUIINITfunction
    MUI_CUSTOMFUNCTION_UNGUIINITfunction
    MUI_CUSTOMFUNCTION_ABORTfunction
    MUI_CUSTOMFUNCTION_UNABORTfunction

    Page Custom Functions

    These defines should be set before inserting a page macro.

    MUI_PAGE_CUSTOMFUNCTION_PREfunction
    MUI_PAGE_CUSTOMFUNCTION_SHOWfunction
    MUI_PAGE_CUSTOMFUNCTION_LEAVEfunction

    Notes:

    • In the Pre function of the Welcome page and the Finish page, you can write to the InstallOptions INI file of the page (ioSpecial.ini)
    • In the Show function of the Welcome, Finish and StartMenu pages, $MUI_HWND contains the HWND of the inner dialog

    Welcome/Finish Page Custom Functions

    This define should be inserted before a single Welcome or Finish page.

    MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INITfunction

    This Init function is called before the InstallOptions INI file for the page is written, so you can use it to initialize any variables used in the page settings.

    Basic: Basic.nsi
    Welcome/Finish page: WelcomeFinish.nsi
    Multiple languages: MultiLanguage.nsi
    Header image: HeaderBitmap.nsi
    Custom pages: InstallOptions.nsi
    Start Menu Folder page: StartMenu.nsi

    • 1.75 - April 1, 2006
      • Added show function for the start menu page
      • Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts

    Made by Joost Verburg.
    Icons designed by Nikos Adamamas, aka adni18.
    Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.

    The zlib/libpng license applies to the Modern UI.

    License Terms

    ©2002-2006 Joost Verburg
    ...">Nsis Modern Ui Installer Icon(11.03.2020)
    © 2020 Nsis Modern Ui Installer Icon.