<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=L+d+allan</id>
	<title>NSIS Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=L+d+allan"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/Special:Contributions/L_d_allan"/>
	<updated>2026-08-27T00:46:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=IfFileExists_Changes_Section_Flags&amp;diff=9508</id>
		<title>IfFileExists Changes Section Flags</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=IfFileExists_Changes_Section_Flags&amp;diff=9508"/>
		<updated>2006-02-04T16:54:08Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* The Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
IfFileExists determines whether certain component sections are checked or unchecked.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include Sections.nsh&lt;br /&gt;
&lt;br /&gt;
Name TestSelectSection&lt;br /&gt;
OutFile &amp;quot;TestSelectSection.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components&lt;br /&gt;
Page instfiles&lt;br /&gt;
ShowInstDetails show&lt;br /&gt;
&lt;br /&gt;
; This file will exist on most computers&lt;br /&gt;
Section /o &amp;quot;autoexec.bat detected&amp;quot; autoexec_detected&lt;br /&gt;
MessageBox MB_OK autoexec&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section /o &amp;quot;Boot.ini detected&amp;quot; boot_detected&lt;br /&gt;
MessageBox MB_OK boot&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section /o &amp;quot;non-existing file detected&amp;quot; missing_detected&lt;br /&gt;
MessageBox MB_OK missing&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Function .onInit&lt;br /&gt;
IfFileExists C:\autoexec.bat AutoexecExists PastAutoexecCheck&lt;br /&gt;
AutoexecExists:&lt;br /&gt;
  ; This is what is done by sections.nsh SelectSection macro&lt;br /&gt;
  SectionGetFlags &amp;quot;${autoexec_detected}&amp;quot; $0&lt;br /&gt;
  IntOp $0 $0 | ${SF_SELECTED}&lt;br /&gt;
  SectionSetFlags &amp;quot;${autoexec_detected}&amp;quot; $0&lt;br /&gt;
&lt;br /&gt;
PastAutoexecCheck:&lt;br /&gt;
IfFileExists C:\boot.ini BootExists PastBootCheck&lt;br /&gt;
BootExists:&lt;br /&gt;
  ; Use the macro from sections.nsh&lt;br /&gt;
  !insertmacro SelectSection ${boot_detected}&lt;br /&gt;
&lt;br /&gt;
PastBootCheck:&lt;br /&gt;
IfFileExists C:\xyz_missing.xyz MissingExists PastMissingCheck&lt;br /&gt;
MissingExists:&lt;br /&gt;
  !insertmacro SelectSection ${missing_detected}&lt;br /&gt;
&lt;br /&gt;
PastMissingCheck:&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=IfFileExists_Changes_Section_Flags&amp;diff=9507</id>
		<title>IfFileExists Changes Section Flags</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=IfFileExists_Changes_Section_Flags&amp;diff=9507"/>
		<updated>2006-02-04T16:51:58Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* The Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
IfFileExists determines whether certain component sections are checked or unchecked.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include Sections.nsh&lt;br /&gt;
&lt;br /&gt;
Name TestSelectSection&lt;br /&gt;
OutFile &amp;quot;TestSelectSection.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components&lt;br /&gt;
Page instfiles&lt;br /&gt;
ShowInstDetails show&lt;br /&gt;
&lt;br /&gt;
; This file will exist on most computers&lt;br /&gt;
Section /o &amp;quot;autoexec.bat detected&amp;quot; autoexec_detected&lt;br /&gt;
MessageBox MB_OK autoexec&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section /o &amp;quot;Boot.ini detected&amp;quot; boot_detected&lt;br /&gt;
MessageBox MB_OK boot&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section /o &amp;quot;non-existing file detected&amp;quot; missing_detected&lt;br /&gt;
MessageBox MB_OK missing&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Function .onInit&lt;br /&gt;
IfFileExists C:\autoexec.bat AutoexecExists PastAutoexecCheck&lt;br /&gt;
AutoexecExists:&lt;br /&gt;
  SectionGetFlags &amp;quot;${autoexec_detected}&amp;quot; $0&lt;br /&gt;
  IntOp $0 $0 | ${SF_SELECTED}&lt;br /&gt;
  SectionSetFlags &amp;quot;${autoexec_detected}&amp;quot; $0&lt;br /&gt;
&lt;br /&gt;
PastAutoexecCheck:&lt;br /&gt;
IfFileExists C:\boot.ini BootExists PastBootCheck&lt;br /&gt;
BootExists:&lt;br /&gt;
  !insertmacro SelectSection ${boot_detected}&lt;br /&gt;
&lt;br /&gt;
PastBootCheck:&lt;br /&gt;
IfFileExists C:\xyz_missing.xyz MissingExists PastMissingCheck&lt;br /&gt;
MissingExists:&lt;br /&gt;
  !insertmacro SelectSection ${missing_detected}&lt;br /&gt;
&lt;br /&gt;
PastMissingCheck:&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=IfFileExists_Changes_Section_Flags&amp;diff=9506</id>
		<title>IfFileExists Changes Section Flags</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=IfFileExists_Changes_Section_Flags&amp;diff=9506"/>
		<updated>2006-02-04T16:51:09Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Example of changing Components Section state during installation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
IfFileExists determines whether certain component sections are checked or unchecked.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis!include Sections.nsh&lt;br /&gt;
&lt;br /&gt;
Name TestSelectSection&lt;br /&gt;
OutFile &amp;quot;TestSelectSection.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components&lt;br /&gt;
Page instfiles&lt;br /&gt;
ShowInstDetails show&lt;br /&gt;
&lt;br /&gt;
; This file will exist on most computers&lt;br /&gt;
Section /o &amp;quot;autoexec.bat detected&amp;quot; autoexec_detected&lt;br /&gt;
MessageBox MB_OK autoexec&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section /o &amp;quot;Boot.ini detected&amp;quot; boot_detected&lt;br /&gt;
MessageBox MB_OK boot&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section /o &amp;quot;non-existing file detected&amp;quot; missing_detected&lt;br /&gt;
MessageBox MB_OK missing&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Function .onInit&lt;br /&gt;
IfFileExists C:\autoexec.bat AutoexecExists PastAutoexecCheck&lt;br /&gt;
AutoexecExists:&lt;br /&gt;
  SectionGetFlags &amp;quot;${autoexec_detected}&amp;quot; $0&lt;br /&gt;
  IntOp $0 $0 | ${SF_SELECTED}&lt;br /&gt;
  SectionSetFlags &amp;quot;${autoexec_detected}&amp;quot; $0&lt;br /&gt;
&lt;br /&gt;
PastAutoexecCheck:&lt;br /&gt;
IfFileExists C:\boot.ini BootExists PastBootCheck&lt;br /&gt;
BootExists:&lt;br /&gt;
  !insertmacro SelectSection ${boot_detected}&lt;br /&gt;
&lt;br /&gt;
PastBootCheck:&lt;br /&gt;
IfFileExists C:\xyz_missing.xyz MissingExists PastMissingCheck&lt;br /&gt;
MissingExists:&lt;br /&gt;
  !insertmacro SelectSection ${missing_detected}&lt;br /&gt;
&lt;br /&gt;
PastMissingCheck:&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Run_an_application_shortcut_after_an_install&amp;diff=9501</id>
		<title>Run an application shortcut after an install</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Run_an_application_shortcut_after_an_install&amp;diff=9501"/>
		<updated>2006-02-02T15:24:45Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Add complete example in addition to &amp;#039;snippets&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jpannequin}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Here is how to launch a shortcut at the end of an install (in the MUI). You may need this if you need to use a specific working directory and don&#039;t want to modify the MUI.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
So suppose I want to launch &amp;quot;C:\User\test.lnk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before calling the macro for finish, you must define the run variables.&lt;br /&gt;
If you define&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!define MUI_FINISHPAGE_RUN &amp;quot;C:\User\test.lnk&amp;quot;&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
it will not work, because it is not an application.&lt;br /&gt;
&lt;br /&gt;
You must set MUI_FINISHPAGE_RUN empty, and use a function instead.&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!define MUI_FINISHPAGE_RUN&lt;br /&gt;
!define MUI_FINISHPAGE_RUN_TEXT &amp;quot;Start a shortcut&amp;quot;&lt;br /&gt;
!define MUI_FINISHPAGE_RUN_FUNCTION &amp;quot;LaunchLink&amp;quot;&lt;br /&gt;
!insertmacro MUI_PAGE_FINISH&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
You can then define the function and execute the link with ExecShell.&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;Function LaunchLink&lt;br /&gt;
  ExecShell &amp;quot;&amp;quot; &amp;quot;C:\User\test.lnk&amp;quot;&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:L d allan|L d allan]] 07:24, 2 February 2006 (PST)&lt;br /&gt;
Here is a complete nsis mui script&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;# Based on NSIS MUI Basic Example Script written by Joost Verburg (thx!)&lt;br /&gt;
  !include &amp;quot;MUI.nsh&amp;quot;&lt;br /&gt;
  Name &amp;quot;Modern UI Test&amp;quot;&lt;br /&gt;
  OutFile &amp;quot;MuiFinishPageRunFunction.exe&amp;quot;&lt;br /&gt;
  InstallDir &amp;quot;$PROGRAMFILES\Modern UI Test&amp;quot;&lt;br /&gt;
  InstallDirRegKey HKCU &amp;quot;Software\Modern UI Test&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  ShowInstDetails show&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Pages&lt;br /&gt;
  !insertmacro MUI_PAGE_WELCOME&lt;br /&gt;
  !insertmacro MUI_PAGE_DIRECTORY&lt;br /&gt;
  !insertmacro MUI_PAGE_INSTFILES&lt;br /&gt;
  &lt;br /&gt;
    # These indented statements modify settings for MUI_PAGE_FINISH&lt;br /&gt;
    !define MUI_FINISHPAGE_NOAUTOCLOSE&lt;br /&gt;
    !define MUI_FINISHPAGE_RUN&lt;br /&gt;
    !define MUI_FINISHPAGE_RUN_NOTCHECKED&lt;br /&gt;
    !define MUI_FINISHPAGE_RUN_TEXT &amp;quot;Start a shortcut&amp;quot;&lt;br /&gt;
    !define MUI_FINISHPAGE_RUN_FUNCTION &amp;quot;LaunchLink&amp;quot;&lt;br /&gt;
    !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED&lt;br /&gt;
    !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt&lt;br /&gt;
  !insertmacro MUI_PAGE_FINISH&lt;br /&gt;
&lt;br /&gt;
;Languages&lt;br /&gt;
!insertmacro MUI_LANGUAGE &amp;quot;English&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
# No components page, so this is anonymous&lt;br /&gt;
Section &amp;quot;Dummy Section&amp;quot; SecDummy&lt;br /&gt;
  SetOutPath &amp;quot;$INSTDIR&amp;quot;&lt;br /&gt;
  File readme.txt&lt;br /&gt;
  WriteRegStr HKCU &amp;quot;Software\Modern UI Test&amp;quot; &amp;quot;&amp;quot; $INSTDIR&lt;br /&gt;
  WriteUninstaller &amp;quot;$INSTDIR\Uninstall.exe&amp;quot;&lt;br /&gt;
  DetailPrint &amp;quot;Reached Dummy section&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Uninstall&amp;quot;&lt;br /&gt;
  Delete &amp;quot;$INSTDIR\Uninstall.exe&amp;quot;&lt;br /&gt;
  RMDir &amp;quot;$INSTDIR&amp;quot;&lt;br /&gt;
  DeleteRegKey /ifempty HKCU &amp;quot;Software\Modern UI Test&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Function LaunchLink&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reached LaunchLink $\r$\n \&lt;br /&gt;
                   SMPROGRAMS: $SMPROGRAMS  $\r$\n \&lt;br /&gt;
                   Start Menu Folder: $STARTMENU_FOLDER $\r$\n \&lt;br /&gt;
                   InstallDirectory: $INSTDIR &amp;quot;&lt;br /&gt;
  ExecShell &amp;quot;&amp;quot; &amp;quot;C:\User\test.lnk&amp;quot;&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9487</id>
		<title>SectionGetFlags Basic Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9487"/>
		<updated>2006-02-01T16:21:35Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|l_d_allan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Simple example for nsis newbies of using SectionGetFlags.&lt;br /&gt;
&lt;br /&gt;
There is another example involving custom pages being shown based on SectionGetFlags at:&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Show custom page when a section has been selected]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;SectionGetFlags&amp;quot;&lt;br /&gt;
OutFile &amp;quot;section_get_flags.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components ; will get warning because no instfiles page&lt;br /&gt;
&lt;br /&gt;
# This is the first section which has index=0&lt;br /&gt;
Section &amp;quot;!Required Read-only Bold&amp;quot; SectionZero&lt;br /&gt;
  SectionIn RO&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This is the second section which has index=1&lt;br /&gt;
Section /o &amp;quot;Section Index One to show MsgBox&amp;quot; ControlsMsgBoxSection&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This section does not have a section_index_output id,&lt;br /&gt;
#   so it can be examined below with SectionGetFlags 2 $SectionVar&lt;br /&gt;
Section /o !Optional &amp;quot;Section Index Two&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
Function .onInstSuccess&lt;br /&gt;
  # Get flags of second section (which is index #1) into register $0&lt;br /&gt;
  SectionGetFlags ${ControlsMsgBoxSection} $0&lt;br /&gt;
&lt;br /&gt;
  # Get flags of third section (which is index #2) into register $1&lt;br /&gt;
  SectionGetFlags 2 $1&lt;br /&gt;
&lt;br /&gt;
  # Just show what the contents of the registers $0 and $1&lt;br /&gt;
  # and section.nsh values&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reg-Zero: $0 $\r$\n \&lt;br /&gt;
                    SfSelected: ${SF_SELECTED} $\r$\n \&lt;br /&gt;
                    Reg-One: $1 $\r$\n \&lt;br /&gt;
                    SfBold:  ${SF_BOLD}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # Do a binary AND of $0 and SF_SELECTED and put results in $0&lt;br /&gt;
  IntOp $0 $0 &amp;amp; ${SF_SELECTED}&lt;br /&gt;
&lt;br /&gt;
  # Register $0 has results of GetSectionFlags of 2nd section&lt;br /&gt;
  #   being AND&#039;ed with SF_SELECTED. It will be either 0 or SF_SELECTED.&lt;br /&gt;
  # Check whether second section was selected&lt;br /&gt;
  IntCmp $0 ${SF_SELECTED} ShowMessageBox PastShowMessageBox&lt;br /&gt;
&lt;br /&gt;
  ShowMessageBox:&lt;br /&gt;
    # Check whether third section is shown in bold and put results in $1&lt;br /&gt;
    IntOp $1 $1 &amp;amp; ${SF_BOLD}&lt;br /&gt;
    MessageBox MB_OK &amp;quot;Section selected$\r$\n \&lt;br /&gt;
                      Is 2nd section bold?: $1&amp;quot;&lt;br /&gt;
  PastShowMessageBox:&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Basic_SectionGetFlags_Example&amp;diff=9486</id>
		<title>Basic SectionGetFlags Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Basic_SectionGetFlags_Example&amp;diff=9486"/>
		<updated>2006-02-01T16:18:51Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Basic SectionGetFlags Example moved to SectionGetFlags Basic Example: More meaningful title ... will get sorted by SectionGetFlags rather than Basic in the Categories -- Examples page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#redirect [[SectionGetFlags Basic Example]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9485</id>
		<title>SectionGetFlags Basic Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9485"/>
		<updated>2006-02-01T16:18:51Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Basic SectionGetFlags Example moved to SectionGetFlags Basic Example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|l_d_allan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Simple example for nsis newbies of using SectionGetFlags.&lt;br /&gt;
&lt;br /&gt;
There is another example involving custom pages being shown based on SectionGetFlags at:&lt;br /&gt;
[[Show custom page when a section has been selected]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;SectionGetFlags&amp;quot;&lt;br /&gt;
OutFile &amp;quot;section_get_flags.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components ; will get warning because no instfiles page&lt;br /&gt;
&lt;br /&gt;
# This is the first section which has index=0&lt;br /&gt;
Section &amp;quot;!Required Read-only Bold&amp;quot; SectionZero&lt;br /&gt;
  SectionIn RO&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This is the second section which has index=1&lt;br /&gt;
Section /o &amp;quot;Section Index One to show MsgBox&amp;quot; ControlsMsgBoxSection&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This section does not have a section_index_output id,&lt;br /&gt;
#   so it can be examined below with SectionGetFlags 2 $SectionVar&lt;br /&gt;
Section /o !Optional &amp;quot;Section Index Two&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
Function .onInstSuccess&lt;br /&gt;
  # Get flags of second section (which is index #1) into register $0&lt;br /&gt;
  SectionGetFlags ${ControlsMsgBoxSection} $0&lt;br /&gt;
&lt;br /&gt;
  # Get flags of third section (which is index #2) into register $1&lt;br /&gt;
  SectionGetFlags 2 $1&lt;br /&gt;
&lt;br /&gt;
  # Just show what the contents of the registers $0 and $1&lt;br /&gt;
  # and section.nsh values&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reg-Zero: $0 $\r$\n \&lt;br /&gt;
                    SfSelected: ${SF_SELECTED} $\r$\n \&lt;br /&gt;
                    Reg-One: $1 $\r$\n \&lt;br /&gt;
                    SfBold:  ${SF_BOLD}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # Do a binary AND of $0 and SF_SELECTED and put results in $0&lt;br /&gt;
  IntOp $0 $0 &amp;amp; ${SF_SELECTED}&lt;br /&gt;
&lt;br /&gt;
  # Register $0 has results of GetSectionFlags of 2nd section&lt;br /&gt;
  #   being AND&#039;ed with SF_SELECTED. It will be either 0 or SF_SELECTED.&lt;br /&gt;
  # Check whether second section was selected&lt;br /&gt;
  IntCmp $0 ${SF_SELECTED} ShowMessageBox PastShowMessageBox&lt;br /&gt;
&lt;br /&gt;
  ShowMessageBox:&lt;br /&gt;
    # Check whether third section is shown in bold and put results in $1&lt;br /&gt;
    IntOp $1 $1 &amp;amp; ${SF_BOLD}&lt;br /&gt;
    MessageBox MB_OK &amp;quot;Section selected$\r$\n \&lt;br /&gt;
                      Is 2nd section bold?: $1&amp;quot;&lt;br /&gt;
  PastShowMessageBox:&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9484</id>
		<title>SectionGetFlags Basic Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9484"/>
		<updated>2006-02-01T16:16:40Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* The Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|l_d_allan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Simple example for nsis newbies of using SectionGetFlags.&lt;br /&gt;
&lt;br /&gt;
There is another example involving custom pages being shown based on SectionGetFlags at:&lt;br /&gt;
[[Show custom page when a section has been selected]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;SectionGetFlags&amp;quot;&lt;br /&gt;
OutFile &amp;quot;section_get_flags.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components ; will get warning because no instfiles page&lt;br /&gt;
&lt;br /&gt;
# This is the first section which has index=0&lt;br /&gt;
Section &amp;quot;!Required Read-only Bold&amp;quot; SectionZero&lt;br /&gt;
  SectionIn RO&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This is the second section which has index=1&lt;br /&gt;
Section /o &amp;quot;Section Index One to show MsgBox&amp;quot; ControlsMsgBoxSection&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This section does not have a section_index_output id,&lt;br /&gt;
#   so it can be examined below with SectionGetFlags 2 $SectionVar&lt;br /&gt;
Section /o !Optional &amp;quot;Section Index Two&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
Function .onInstSuccess&lt;br /&gt;
  # Get flags of second section (which is index #1) into register $0&lt;br /&gt;
  SectionGetFlags ${ControlsMsgBoxSection} $0&lt;br /&gt;
&lt;br /&gt;
  # Get flags of third section (which is index #2) into register $1&lt;br /&gt;
  SectionGetFlags 2 $1&lt;br /&gt;
&lt;br /&gt;
  # Just show what the contents of the registers $0 and $1&lt;br /&gt;
  # and section.nsh values&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reg-Zero: $0 $\r$\n \&lt;br /&gt;
                    SfSelected: ${SF_SELECTED} $\r$\n \&lt;br /&gt;
                    Reg-One: $1 $\r$\n \&lt;br /&gt;
                    SfBold:  ${SF_BOLD}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # Do a binary AND of $0 and SF_SELECTED and put results in $0&lt;br /&gt;
  IntOp $0 $0 &amp;amp; ${SF_SELECTED}&lt;br /&gt;
&lt;br /&gt;
  # Register $0 has results of GetSectionFlags of 2nd section&lt;br /&gt;
  #   being AND&#039;ed with SF_SELECTED. It will be either 0 or SF_SELECTED.&lt;br /&gt;
  # Check whether second section was selected&lt;br /&gt;
  IntCmp $0 ${SF_SELECTED} ShowMessageBox PastShowMessageBox&lt;br /&gt;
&lt;br /&gt;
  ShowMessageBox:&lt;br /&gt;
    # Check whether third section is shown in bold and put results in $1&lt;br /&gt;
    IntOp $1 $1 &amp;amp; ${SF_BOLD}&lt;br /&gt;
    MessageBox MB_OK &amp;quot;Section selected$\r$\n \&lt;br /&gt;
                      Is 2nd section bold?: $1&amp;quot;&lt;br /&gt;
  PastShowMessageBox:&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9483</id>
		<title>Show custom page when a section has been selected</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9483"/>
		<updated>2006-02-01T16:14:54Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Remove a link to another example I put in to see how links work .... should have used sand-box.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
If you want to show a custom page only when a certain section has been selected, use SectionGetFlags to get the state of the section in the page creator function and the abort command to skip the page if the section has not been selected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page custom CustomPage&lt;br /&gt;
&lt;br /&gt;
Function CustomPage&lt;br /&gt;
 &lt;br /&gt;
  SectionGetFlags ${Section_Name} $R0 &lt;br /&gt;
  IntOp $R0 $R0 &amp;amp; ${SF_SELECTED} &lt;br /&gt;
  IntCmp $R0 ${SF_SELECTED} show &lt;br /&gt;
 &lt;br /&gt;
  Abort &lt;br /&gt;
 &lt;br /&gt;
  show: &lt;br /&gt;
 &lt;br /&gt;
  ;If not using Modern UI use InstallOptions::dialog &amp;quot;iofile.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;text&amp;quot; &amp;quot;subtext&amp;quot; &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY &amp;quot;iofile.ini&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9482</id>
		<title>Show custom page when a section has been selected</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9482"/>
		<updated>2006-02-01T16:13:29Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
If you want to show a custom page only when a certain section has been selected, use SectionGetFlags to get the state of the section in the page creator function and the abort command to skip the page if the section has not been selected.&lt;br /&gt;
&lt;br /&gt;
There is a another example that just involves SectionGetFlags at:&lt;br /&gt;
[[Basic SectionGetFlags Example]]&lt;br /&gt;
[[User:L d allan|L d allan]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page custom CustomPage&lt;br /&gt;
&lt;br /&gt;
Function CustomPage&lt;br /&gt;
 &lt;br /&gt;
  SectionGetFlags ${Section_Name} $R0 &lt;br /&gt;
  IntOp $R0 $R0 &amp;amp; ${SF_SELECTED} &lt;br /&gt;
  IntCmp $R0 ${SF_SELECTED} show &lt;br /&gt;
 &lt;br /&gt;
  Abort &lt;br /&gt;
 &lt;br /&gt;
  show: &lt;br /&gt;
 &lt;br /&gt;
  ;If not using Modern UI use InstallOptions::dialog &amp;quot;iofile.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;text&amp;quot; &amp;quot;subtext&amp;quot; &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY &amp;quot;iofile.ini&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9481</id>
		<title>SectionGetFlags Basic Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9481"/>
		<updated>2006-02-01T16:12:02Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|l_d_allan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Simple example for nsis newbies of using SectionGetFlags.&lt;br /&gt;
&lt;br /&gt;
There is another example involving custom pages being shown based on SectionGetFlags at:&lt;br /&gt;
[[Show custom page when a section has been selected]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;SectionGetFlags&amp;quot;&lt;br /&gt;
OutFile &amp;quot;section_get_flags.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components ; will get warning because no instfile page&lt;br /&gt;
&lt;br /&gt;
# This is the first section which has index=0&lt;br /&gt;
Section &amp;quot;!Required Read-only Bold&amp;quot; SectionZero&lt;br /&gt;
  SectionIn RO&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This is the second section which has index=1&lt;br /&gt;
Section /o &amp;quot;Section Index One to show MsgBox&amp;quot; ControlsMsgBoxSection&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This section does not have a section_index_output id,&lt;br /&gt;
#   so it can be examined below with SectionGetFlags 2 $SectionVar&lt;br /&gt;
Section /o !Optional &amp;quot;Section Index Two&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
Function .onInstSuccess&lt;br /&gt;
  # Get flags of second section (which is index #1) into register $0&lt;br /&gt;
  SectionGetFlags ${ControlsMsgBoxSection} $0&lt;br /&gt;
&lt;br /&gt;
  # Get flags of third section (which is index #2) into register $1&lt;br /&gt;
  SectionGetFlags 2 $1&lt;br /&gt;
&lt;br /&gt;
  # Just show what the contents of the registers $0 and $1&lt;br /&gt;
  # and section.nsh values&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reg-Zero: $0 $\r$\n \&lt;br /&gt;
                    SfSelected: ${SF_SELECTED} $\r$\n \&lt;br /&gt;
                    Reg-One: $1 $\r$\n \&lt;br /&gt;
                    SfBold:  ${SF_BOLD}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # Do a binary AND of $0 and SF_SELECTED and put results in $0&lt;br /&gt;
  IntOp $0 $0 &amp;amp; ${SF_SELECTED}&lt;br /&gt;
&lt;br /&gt;
  # Register $0 has results of GetSectionFlags of 2nd section&lt;br /&gt;
  #   being AND&#039;ed with SF_SELECTED. It will be either 0 or SF_SELECTED.&lt;br /&gt;
  # Check whether second section was selected&lt;br /&gt;
  IntCmp $0 ${SF_SELECTED} ShowMessageBox PastShowMessageBox&lt;br /&gt;
&lt;br /&gt;
  ShowMessageBox:&lt;br /&gt;
    # Check whether third section is shown in bold and put results in $1&lt;br /&gt;
    IntOp $1 $1 &amp;amp; ${SF_BOLD}&lt;br /&gt;
    MessageBox MB_OK &amp;quot;Section selected$\r$\n \&lt;br /&gt;
                      Is 2nd section bold?: $1&amp;quot;&lt;br /&gt;
  PastShowMessageBox:&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9480</id>
		<title>SectionGetFlags Basic Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9480"/>
		<updated>2006-02-01T16:10:34Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|l_d_allan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Simple example for nsis newbies of using SectionGetFlags.&lt;br /&gt;
&lt;br /&gt;
There is another example involve custom pages at:&lt;br /&gt;
[[Show custom page when a section has been selected]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;SectionGetFlags&amp;quot;&lt;br /&gt;
OutFile &amp;quot;section_get_flags.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components ; will get warning because no instfile page&lt;br /&gt;
&lt;br /&gt;
# This is the first section which has index=0&lt;br /&gt;
Section &amp;quot;!Required Read-only Bold&amp;quot; SectionZero&lt;br /&gt;
  SectionIn RO&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This is the second section which has index=1&lt;br /&gt;
Section /o &amp;quot;Section Index One to show MsgBox&amp;quot; ControlsMsgBoxSection&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This section does not have a section_index_output id,&lt;br /&gt;
#   so it can be examined below with SectionGetFlags 2 $SectionVar&lt;br /&gt;
Section /o !Optional &amp;quot;Section Index Two&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
Function .onInstSuccess&lt;br /&gt;
  # Get flags of second section (which is index #1) into register $0&lt;br /&gt;
  SectionGetFlags ${ControlsMsgBoxSection} $0&lt;br /&gt;
&lt;br /&gt;
  # Get flags of third section (which is index #2) into register $1&lt;br /&gt;
  SectionGetFlags 2 $1&lt;br /&gt;
&lt;br /&gt;
  # Just show what the contents of the registers $0 and $1&lt;br /&gt;
  # and section.nsh values&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reg-Zero: $0 $\r$\n \&lt;br /&gt;
                    SfSelected: ${SF_SELECTED} $\r$\n \&lt;br /&gt;
                    Reg-One: $1 $\r$\n \&lt;br /&gt;
                    SfBold:  ${SF_BOLD}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # Do a binary AND of $0 and SF_SELECTED and put results in $0&lt;br /&gt;
  IntOp $0 $0 &amp;amp; ${SF_SELECTED}&lt;br /&gt;
&lt;br /&gt;
  # Register $0 has results of GetSectionFlags of 2nd section&lt;br /&gt;
  #   being AND&#039;ed with SF_SELECTED. It will be either 0 or SF_SELECTED.&lt;br /&gt;
  # Check whether second section was selected&lt;br /&gt;
  IntCmp $0 ${SF_SELECTED} ShowMessageBox PastShowMessageBox&lt;br /&gt;
&lt;br /&gt;
  ShowMessageBox:&lt;br /&gt;
    # Check whether third section is shown in bold and put results in $1&lt;br /&gt;
    IntOp $1 $1 &amp;amp; ${SF_BOLD}&lt;br /&gt;
    MessageBox MB_OK &amp;quot;Section selected$\r$\n \&lt;br /&gt;
                      Is 2nd section bold?: $1&amp;quot;&lt;br /&gt;
  PastShowMessageBox:&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9479</id>
		<title>Show custom page when a section has been selected</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9479"/>
		<updated>2006-02-01T16:07:59Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Link to another example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
If you want to show a custom page only when a certain section has been selected, use SectionGetFlags to get the state of the section in the page creator function and the abort command to skip the page if the section has not been selected.&lt;br /&gt;
&lt;br /&gt;
There is a another example at:&lt;br /&gt;
[[Basic SectionGetFlags Example]]&lt;br /&gt;
[[User:L d allan|L d allan]] 08:07, 1 February 2006 (PST)&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page custom CustomPage&lt;br /&gt;
&lt;br /&gt;
Function CustomPage&lt;br /&gt;
 &lt;br /&gt;
  SectionGetFlags ${Section_Name} $R0 &lt;br /&gt;
  IntOp $R0 $R0 &amp;amp; ${SF_SELECTED} &lt;br /&gt;
  IntCmp $R0 ${SF_SELECTED} show &lt;br /&gt;
 &lt;br /&gt;
  Abort &lt;br /&gt;
 &lt;br /&gt;
  show: &lt;br /&gt;
 &lt;br /&gt;
  ;If not using Modern UI use InstallOptions::dialog &amp;quot;iofile.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;text&amp;quot; &amp;quot;subtext&amp;quot; &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY &amp;quot;iofile.ini&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9478</id>
		<title>Show custom page when a section has been selected</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9478"/>
		<updated>2006-02-01T16:06:25Z</updated>

		<summary type="html">&lt;p&gt;L d allan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
If you want to show a custom page only when a certain section has been selected, use SectionGetFlags to get the state of the section in the page creator function and the abort command to skip the page if the section has not been selected.&lt;br /&gt;
&lt;br /&gt;
There is a another example at:&lt;br /&gt;
[[Basic SectionGetFlags Example]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page custom CustomPage&lt;br /&gt;
&lt;br /&gt;
Function CustomPage&lt;br /&gt;
 &lt;br /&gt;
  SectionGetFlags ${Section_Name} $R0 &lt;br /&gt;
  IntOp $R0 $R0 &amp;amp; ${SF_SELECTED} &lt;br /&gt;
  IntCmp $R0 ${SF_SELECTED} show &lt;br /&gt;
 &lt;br /&gt;
  Abort &lt;br /&gt;
 &lt;br /&gt;
  show: &lt;br /&gt;
 &lt;br /&gt;
  ;If not using Modern UI use InstallOptions::dialog &amp;quot;iofile.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;text&amp;quot; &amp;quot;subtext&amp;quot; &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY &amp;quot;iofile.ini&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9477</id>
		<title>Show custom page when a section has been selected</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9477"/>
		<updated>2006-02-01T16:02:32Z</updated>

		<summary type="html">&lt;p&gt;L d allan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
If you want to show a custom page only when a certain section has been selected, use SectionGetFlags to get the state of the section in the page creator function and the abort command to skip the page if the section has not been selected.&lt;br /&gt;
&lt;br /&gt;
There is a another example at:&lt;br /&gt;
[[Show custom page when a section has been selected]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page custom CustomPage&lt;br /&gt;
&lt;br /&gt;
Function CustomPage&lt;br /&gt;
 &lt;br /&gt;
  SectionGetFlags ${Section_Name} $R0 &lt;br /&gt;
  IntOp $R0 $R0 &amp;amp; ${SF_SELECTED} &lt;br /&gt;
  IntCmp $R0 ${SF_SELECTED} show &lt;br /&gt;
 &lt;br /&gt;
  Abort &lt;br /&gt;
 &lt;br /&gt;
  show: &lt;br /&gt;
 &lt;br /&gt;
  ;If not using Modern UI use InstallOptions::dialog &amp;quot;iofile.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;text&amp;quot; &amp;quot;subtext&amp;quot; &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY &amp;quot;iofile.ini&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9476</id>
		<title>Show custom page when a section has been selected</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Show_custom_page_when_a_section_has_been_selected&amp;diff=9476"/>
		<updated>2006-02-01T16:01:44Z</updated>

		<summary type="html">&lt;p&gt;L d allan: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|jan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
If you want to show a custom page only when a certain section has been selected, use SectionGetFlags to get the state of the section in the page creator function and the abort command to skip the page if the section has not been selected.&lt;br /&gt;
&lt;br /&gt;
There is a another example at:&lt;br /&gt;
[[Get vertical space of INI file value]]&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page custom CustomPage&lt;br /&gt;
&lt;br /&gt;
Function CustomPage&lt;br /&gt;
 &lt;br /&gt;
  SectionGetFlags ${Section_Name} $R0 &lt;br /&gt;
  IntOp $R0 $R0 &amp;amp; ${SF_SELECTED} &lt;br /&gt;
  IntCmp $R0 ${SF_SELECTED} show &lt;br /&gt;
 &lt;br /&gt;
  Abort &lt;br /&gt;
 &lt;br /&gt;
  show: &lt;br /&gt;
 &lt;br /&gt;
  ;If not using Modern UI use InstallOptions::dialog &amp;quot;iofile.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;text&amp;quot; &amp;quot;subtext&amp;quot; &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY &amp;quot;iofile.ini&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9475</id>
		<title>SectionGetFlags Basic Example</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=SectionGetFlags_Basic_Example&amp;diff=9475"/>
		<updated>2006-02-01T15:44:26Z</updated>

		<summary type="html">&lt;p&gt;L d allan: Newbie example of SectionGetFlags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|l_d_allan}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Simple example for nsis newbies of using SectionGetFlags.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!include &amp;quot;Sections.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;SectionGetFlags&amp;quot;&lt;br /&gt;
OutFile &amp;quot;section_get_flags.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Page components ; will get warning because no instfile page&lt;br /&gt;
&lt;br /&gt;
# This is the first section which has index=0&lt;br /&gt;
Section &amp;quot;!Required Read-only Bold&amp;quot; SectionZero&lt;br /&gt;
  SectionIn RO&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This is the second section which has index=1&lt;br /&gt;
Section /o &amp;quot;Section Index One to show MsgBox&amp;quot; ControlsMsgBoxSection&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
# This section does not have a section_index_output id,&lt;br /&gt;
#   so it can be examined below with SectionGetFlags 2 $SectionVar&lt;br /&gt;
Section /o !Optional &amp;quot;Section Index Two&amp;quot;&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
Function .onInstSuccess&lt;br /&gt;
  # Get flags of second section (which is index #1) into register $0&lt;br /&gt;
  SectionGetFlags ${ControlsMsgBoxSection} $0&lt;br /&gt;
&lt;br /&gt;
  # Get flags of third section (which is index #2) into register $1&lt;br /&gt;
  SectionGetFlags 2 $1&lt;br /&gt;
&lt;br /&gt;
  # Just show what the contents of the registers $0 and $1&lt;br /&gt;
  # and section.nsh values&lt;br /&gt;
  MessageBox MB_OK &amp;quot;Reg-Zero: $0 $\r$\n \&lt;br /&gt;
                    SfSelected: ${SF_SELECTED} $\r$\n \&lt;br /&gt;
                    Reg-One: $1 $\r$\n \&lt;br /&gt;
                    SfBold:  ${SF_BOLD}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  # Do a binary AND of $0 and SF_SELECTED and put results in $0&lt;br /&gt;
  IntOp $0 $0 &amp;amp; ${SF_SELECTED}&lt;br /&gt;
&lt;br /&gt;
  # Register $0 has results of GetSectionFlags of 2nd section&lt;br /&gt;
  #   being AND&#039;ed with SF_SELECTED. It will be either 0 or SF_SELECTED.&lt;br /&gt;
  # Check whether second section was selected&lt;br /&gt;
  IntCmp $0 ${SF_SELECTED} ShowMessageBox PastShowMessageBox&lt;br /&gt;
&lt;br /&gt;
  ShowMessageBox:&lt;br /&gt;
    # Check whether third section is shown in bold and put results in $1&lt;br /&gt;
    IntOp $1 $1 &amp;amp; ${SF_BOLD}&lt;br /&gt;
    MessageBox MB_OK &amp;quot;Section selected$\r$\n \&lt;br /&gt;
                      Is 2nd section bold?: $1&amp;quot;&lt;br /&gt;
  PastShowMessageBox:&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>L d allan</name></author>
	</entry>
</feed>