<?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=Dsuess</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=Dsuess"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/Special:Contributions/Dsuess"/>
	<updated>2026-07-24T04:13:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:FontName_plug-in&amp;diff=24878</id>
		<title>Talk:FontName plug-in</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:FontName_plug-in&amp;diff=24878"/>
		<updated>2017-02-26T14:49:28Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: Update to base installer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Do you plan on updating the FontName plugin to include the latest changes from [[Advanced Font Installation]]? We&#039;ve been having to manually execute the FontName plugin and then copy over the patched files to fix the issues when creating a new installation environment. Keep up the great work!&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=NSIS_Dialog_Designer&amp;diff=24873</id>
		<title>NSIS Dialog Designer</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=NSIS_Dialog_Designer&amp;diff=24873"/>
		<updated>2017-01-17T15:33:08Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: /* Version history */ Added notes for v1.4.2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Related_Software]]&lt;br /&gt;
NSIS Dialog Designer is an IDE that provides a graphical tool to easily design your custom setup pages for the great NSIS installer system.&lt;br /&gt;
&lt;br /&gt;
It supports MUI2 (Modern User Interface 2) dialogs and generates NSIS files ready to be included into your own *.nsi install script.&lt;br /&gt;
&lt;br /&gt;
[[File:ndd_screenshot.png|thumb|Screenshot]]&lt;br /&gt;
&lt;br /&gt;
NSIS Dialog Designer is &#039;&#039;&#039;freeware&#039;&#039;&#039; and can be used to design both free and commercial setups.&lt;br /&gt;
&lt;br /&gt;
NSIS Dialog Designer is still a work-in-progress; please test it and give me your feedback to let this tool suit your needs.&lt;br /&gt;
&lt;br /&gt;
Use this thread for comments:&lt;br /&gt;
http://forums.winamp.com/showthread.php?p=2764874#post2764874.&lt;br /&gt;
&lt;br /&gt;
== How does it work ==&lt;br /&gt;
NSIS Dialog Designer is a relatively simple IDE; if you&#039;re used to Visual Studio(TM) or Eclipse you&#039;ll feel at home.&lt;br /&gt;
Start by creating a new dialog (File | New), then add some controls to it by choosing them from the Toolbox.&lt;br /&gt;
Each control has properties and you can easily edit them into the property grid.&lt;br /&gt;
&lt;br /&gt;
When you save the dialog (suppose you called it Form1), NSIS Dialog Designer will create 2 separate files:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Form1.nsddef&#039;&#039;&#039; is the definition of your dialog in XML format; it contains all controls definitions and their properties&lt;br /&gt;
*&#039;&#039;&#039;Form1.nsdinc&#039;&#039;&#039; is an NSIS script containing all the NSIS commands needed to render your dialog; this is the file you&#039;ll include into your own NSIS setup script.&lt;br /&gt;
&lt;br /&gt;
== Supported controls ==&lt;br /&gt;
NSIS Dialog Designer actually supports the following controls:&lt;br /&gt;
*HLine&lt;br /&gt;
*VLine&lt;br /&gt;
*Label&lt;br /&gt;
*Icon&lt;br /&gt;
*Bitmap&lt;br /&gt;
*Link&lt;br /&gt;
*Button&lt;br /&gt;
*GroupBox&lt;br /&gt;
*CheckBox&lt;br /&gt;
*RadioButton&lt;br /&gt;
*Text&lt;br /&gt;
*Password&lt;br /&gt;
*Number&lt;br /&gt;
*ComboBox&lt;br /&gt;
*DropList&lt;br /&gt;
*ListBox&lt;br /&gt;
*ProgressBar&lt;br /&gt;
*DirRequest&lt;br /&gt;
*FileRequest&lt;br /&gt;
*RichEdit&lt;br /&gt;
&lt;br /&gt;
For each control you can set name, position and size, font, colors.&lt;br /&gt;
Controls also have events bindable to your own script functions.&lt;br /&gt;
&lt;br /&gt;
You can also provide your own script parts and fully customize the generated script.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
NSIS Dialog Designer is free and available here:&lt;br /&gt;
* http://coolsoft.altervista.org/en/nsisdialogdesigner&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
v.1.4.2 - 2016-08-24&lt;br /&gt;
FIX: Fixed setup procedure for Windows 10 compatibility.&lt;br /&gt;
FIX: Fixed .NET framework detection (use .NET Framework 4.0 if already installed).&lt;br /&gt;
&lt;br /&gt;
v.1.4.1 - 2015-09-07&lt;br /&gt;
FIX: Fixed small memory leak in generated NSIS script&lt;br /&gt;
     (dialog handle left on the stack when calling nsDialogs::Show).&lt;br /&gt;
&lt;br /&gt;
v.1.4.0 - 2015-03-17&lt;br /&gt;
NEW: Dialog has a new property &amp;quot;DialogUI&amp;quot; which allows user to set custom&lt;br /&gt;
     DialogID and Size (i.e.: using a different UI like sdbarker_tiny.exe)&lt;br /&gt;
FIX: HLine and VLine controls don&#039;t pop their handle from stack.&lt;br /&gt;
&lt;br /&gt;
v.1.3.3 - 2015-03-09&lt;br /&gt;
FIX: Readonly and TextLimit properties of Number control do not work.&lt;br /&gt;
&lt;br /&gt;
v.1.3.2 - 2014-11-10&lt;br /&gt;
FIX: Fixed DialogID and Size management, form Size is now readonly unless DialogID is set to a custom value.&lt;br /&gt;
&lt;br /&gt;
v.1.3.1 - 2014-10-27&lt;br /&gt;
FIX: Can&#039;t set custom dialog size, it always revert back to default.&lt;br /&gt;
FIX: Style and ExStyle dialog properties were serialized even of not necessary.&lt;br /&gt;
FIX: Removed useless Visible and Enabled dialog properties.&lt;br /&gt;
&lt;br /&gt;
v.1.3.0 - 2014-08-12&lt;br /&gt;
NEW: TabIndex property of each control is now synchronized with control order into its parent child controls collection.&lt;br /&gt;
     Changing TabIndex (directly or through the &amp;quot;Set TabOrder...&amp;quot; menu command will also change the scripting order of the&lt;br /&gt;
     control into the generated NSIS script.&lt;br /&gt;
NEW: A warning is now emitted into .nsdinc file to warn the user about manually editing the file.&lt;br /&gt;
FIX: When dragging a control over another, the dragged control disappeared making it difficult to place two overlapping&lt;br /&gt;
     controls (think about a background bitmap).&lt;br /&gt;
FIX: Show a custom error message when setting Dialog BackColor property to Transparent.&lt;br /&gt;
FIX: Fixed properties exposed by HLine and VLine special controls.&lt;br /&gt;
FIX: Generated script for DirRequest/FileRequest controls is missing some properties (Enabled, Visible, onChange, onClick,&lt;br /&gt;
     Style, ExStyle, ControlCustomScript).&lt;br /&gt;
&lt;br /&gt;
v.1.2.0 - 2014-07-11&lt;br /&gt;
NEW: CoordinateSystem conversions are now done with higher precision.&lt;br /&gt;
     (thanks to shadowpoa for feedback: http://forums.winamp.com/showpost.php?p=3001224)&lt;br /&gt;
NEW: Control sizes are now written with up to 2 decimals in NSIS generated script.&lt;br /&gt;
NEW: Added a new &amp;quot;All&amp;quot; subproperty to controls CoordinateSystem property;&lt;br /&gt;
     it can be used to change X,Y,Width,Height subproperties all together.&lt;br /&gt;
FIX: Wrong vertical CoordinateSystem conversion &amp;quot;Pixel --&amp;gt; DialogUnits&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
v.1.1.3 - 2013-12-16&lt;br /&gt;
FIX: Fixed generated script for DirRequest and FileRequest controls, not respecting CoordinateSystem.&lt;br /&gt;
&lt;br /&gt;
v.1.1.2 - 2013-01-11&lt;br /&gt;
FIX: Removed non-working color properties on ComboBox, CheckBox and RadioButton.&lt;br /&gt;
     See here for workarounds:&lt;br /&gt;
     ComboBox: http://forums.winamp.com/showpost.php?p=2174815&lt;br /&gt;
     CheckBox: http://forums.winamp.com/showpost.php?p=2354612&lt;br /&gt;
     RadioButton: http://forums.winamp.com/showpost.php?p=1974758&lt;br /&gt;
FIX: Multiline TextBox coordinates were always in pixels&lt;br /&gt;
FIX: TextBox creation script styles when Multiline=True&lt;br /&gt;
&lt;br /&gt;
v.1.1.1 - 2012-10-01&lt;br /&gt;
FIX: Fixed generated script for FileRequest control (wrong test on returned string).&lt;br /&gt;
&lt;br /&gt;
v.1.1.0 - 2012-09-14&lt;br /&gt;
NEW: Improved support for DialogIDs other than the default one (1018).&lt;br /&gt;
     User can now select 1044 (Welcome &amp;amp; Finish pages) and designer will change dialog size accordingly.&lt;br /&gt;
NEW: Added RichText control support. It does not support RTF text loading, it must be customized by&lt;br /&gt;
     the user (see here: http://forums.winamp.com/showthread.php?t=288129)&lt;br /&gt;
&lt;br /&gt;
v.1.0.0 - 2012-08-25&lt;br /&gt;
After a long time from latest one, it&#039;s now time to release the first stable version.&lt;br /&gt;
FIX: Text property of Number control now accepts numeric values and variable nalems (like $abc).&lt;br /&gt;
FIX: Minor cosmetic fixes.&lt;br /&gt;
&lt;br /&gt;
v.0.9.16 - 2012-04-20&lt;br /&gt;
FIX: SelectedItem property of ListBox, ComboBox and DropList controls now accepts any value (like $abc).&lt;br /&gt;
&lt;br /&gt;
v.0.9.15 - 2012-04-13&lt;br /&gt;
FIX: NullReference exception thrown when adding an HLine or VLine control.&lt;br /&gt;
&lt;br /&gt;
v.0.9.14 - 2012-03-20&lt;br /&gt;
NEW: Panel control, which is only a container for other controls&lt;br /&gt;
     (useful to create more than one RadioButtons group).&lt;br /&gt;
     It has no corresponding NSIS control, so no NSIS script if generated for it.&lt;br /&gt;
NEW: Added property &amp;quot;Checked&amp;quot; to RadioButton control.&lt;br /&gt;
     Only one RadioButton can be selected at once; if you need to create two (or more) different groups,&lt;br /&gt;
     you must include RadioButtons into a GroupBox or Panel control.&lt;br /&gt;
&lt;br /&gt;
v.0.9.13 - 2012-03-09&lt;br /&gt;
FIX: Wrong code generated for MaxLength property of TextBox control (thanks to fabpolli for bug report).&lt;br /&gt;
&lt;br /&gt;
v.0.9.12 - 2012-02-27&lt;br /&gt;
NEW: Added &amp;quot;Percentage&amp;quot; to the available NSIS coordinate systems.&lt;br /&gt;
NEW: Selection of NSIS coordinate system is now possible at control level, and for each&lt;br /&gt;
     component (X, Y, Width, Height). So now is possible to have different coordinate&lt;br /&gt;
     systems for different controls.&lt;br /&gt;
     Controls coordinate system default value is &amp;quot;Inherit&amp;quot;; this means that by default&lt;br /&gt;
     each control is rendered using the same coordinate system as the containing dialog.&lt;br /&gt;
&lt;br /&gt;
v.0.9.11 - 2012-02-11&lt;br /&gt;
NEW: NSIS scripts (*.nsdinc files) controls position and size values can now be selected&lt;br /&gt;
     between DU (Dialog units, the new default mode) and Pixels.&lt;br /&gt;
     The default coordinate system mode can be set into Options dialog.&lt;br /&gt;
NEW: Added 2 new controls: DirRequest and FileRequest.&lt;br /&gt;
&lt;br /&gt;
v.0.9.10 - 2011-11-23&lt;br /&gt;
FIX: Fixed bug that prevents opening forms where SetupType property is different from default value (Install).&lt;br /&gt;
FIX: IDE layout was not saved correctly and lost between version upgrades.&lt;br /&gt;
     Please reset layout (View | Reset layout), customize it then restart IDE to save correctly.&lt;br /&gt;
&lt;br /&gt;
v.0.9.9 - 2011-11-21&lt;br /&gt;
NEW: Added new &amp;quot;check updates&amp;quot; features: it periodically checks for new releases on CoolSoft website.&lt;br /&gt;
NEW: Script preview editor now preserves selection and cursor position after script changes and&lt;br /&gt;
     when switching between multiple opened dialogs.&lt;br /&gt;
NEW: TabIndex property can now be used to customize focus path through controls.&lt;br /&gt;
NEW: Added context menu to dialog designer, it shows Edit menu items.&lt;br /&gt;
NEW: Dialog .nsddef files are now created with UTF-8 encoding.&lt;br /&gt;
NEW: .nsddef and .nsdinc files now include NSISDialogDesigner version into header comments.&lt;br /&gt;
NEW: Duplicate font definitions are merged, generating only a single variable.&lt;br /&gt;
NEW: .nsddef files can now be opened by drag&amp;amp;drop from Windows Explorer.&lt;br /&gt;
NEW: IDE layout can now be reset through View menu item &amp;quot;Reset layout&amp;quot;.&lt;br /&gt;
FIX: Property are now stored into .nsddef only if value is different from default.&lt;br /&gt;
FIX: Fixed issue on copy/paste controls (duplicate control name).&lt;br /&gt;
FIX: User custom scripts won&#039;t be generated during debug, avoiding compile error due to missing functions.&lt;br /&gt;
&lt;br /&gt;
v.0.9.8 - 2011-09-12&lt;br /&gt;
NEW: Script editor/preview now has NSIS syntax highlighting and code folding,&lt;br /&gt;
thanks to FastColoredTextBox&lt;br /&gt;
(LGPL3 control, see here: http://www.codeproject.com/KB/edit/FastColoredTextBox_.aspx)&lt;br /&gt;
FIX: Styles property wrongly uses the value of ExStyles property.&lt;br /&gt;
&lt;br /&gt;
v.0.9.7 - 2011-09-11&lt;br /&gt;
NEW: Added support for Unicode into generated .nsdinc scripts (needs an Unicode version of NSIS).&lt;br /&gt;
NEW: New (self explaining) control properties: Visible and Enabled.&lt;br /&gt;
NEW: Dialog name (and so the corresponding NSIS variable) can now be set independently&lt;br /&gt;
     from its .nsddef filename. It could be set through the new &amp;quot;Name&amp;quot; dialog property.&lt;br /&gt;
FIX: Generated test script (the one compiled with F5) now checks user&lt;br /&gt;
     custom scripts to avoid redefining an already defined function.&lt;br /&gt;
     (thanks to Benjamin Richardson for reporting bug)&lt;br /&gt;
FIX: Fixed broken uninstall test script.&lt;br /&gt;
FIX: Some properties appear in bold into Property Grid, even if their&lt;br /&gt;
     value is the default one. This caused the generate script to be longer than required.&lt;br /&gt;
FIX: Custom script editor now accepts TAB key.&lt;br /&gt;
FIX: Script preview is cleared when closing the last dialog editor.&lt;br /&gt;
FIX: Fixed focus management issues that prevents DEL key to work into PropertyGrid.&lt;br /&gt;
&lt;br /&gt;
v.0.9.6 - 2011-06-28&lt;br /&gt;
NEW: Added new property SetupType to dialog, allowing the generated script to be used&lt;br /&gt;
     in both Install and Uninstall scripts.&lt;br /&gt;
NEW: Debugger code to debug Uninstaller dialogs.&lt;br /&gt;
FIX: Cleaned up the debug scripts.&lt;br /&gt;
&lt;br /&gt;
v.0.9.5 - 2011-06-16&lt;br /&gt;
BUG: Fixed key management preventing DEL key to be used inside PropertyGrid (thanks to Jovet for bug report)&lt;br /&gt;
NEW: Edit menu items now are enabled according to active content (designer, property, toolbox, ...)&lt;br /&gt;
NEW: DialogID and Size now are public properties (deedsmedia request)&lt;br /&gt;
     (can be reset to default values by right-clicking on PropertyGrid item)&lt;br /&gt;
&lt;br /&gt;
v.0.9.4 - 2011-05-29&lt;br /&gt;
BUG: Fixed permission issues on UAC enabled systems.&lt;br /&gt;
&lt;br /&gt;
v.0.9.3 - 2011-04-20&lt;br /&gt;
NEW: Added new properties ForeColor and BackColor&lt;br /&gt;
     (not working for: Button, ComboBox, DropList, GroupBox, HLine, VLine, ProgressBar)&lt;br /&gt;
NEW: Added new property Font&lt;br /&gt;
NEW: Designer now can show a grid (see Tools | Options menu)&lt;br /&gt;
BUG: Editor does not save dialogs when exiting with close button.&lt;br /&gt;
BUG: Script preview not updated when a new control is added&lt;br /&gt;
&lt;br /&gt;
v.0.9.2 - 2011-04-20&lt;br /&gt;
BUG: Missing property &amp;quot;Name&amp;quot; is now shown&lt;br /&gt;
     (Dialog does not have it because name is the same as its definition filename)&lt;br /&gt;
&lt;br /&gt;
v.0.9.1 - 2011-04-20&lt;br /&gt;
NEW: New dockable content with realtime NSIS generated script preview&lt;br /&gt;
&lt;br /&gt;
v.0.9.0 - 2011-04-18&lt;br /&gt;
First public release&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=User:Dsuess&amp;diff=24775</id>
		<title>User:Dsuess</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=User:Dsuess&amp;diff=24775"/>
		<updated>2016-05-30T18:26:04Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: initial signiture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-c0de munkey-&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Reference/!define&amp;diff=24774</id>
		<title>Reference/!define</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Reference/!define&amp;diff=24774"/>
		<updated>2016-05-30T18:13:51Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: Added StrFTime Format a time string rules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=!define =&lt;br /&gt;
&lt;br /&gt;
 [/ifndef | /redef] ([/date|/utcdate] gflag [value]) | (/math gflag val1 OP val2) | (/file gflag filename.txt)&lt;br /&gt;
&lt;br /&gt;
This command will add gflag to the global define list. This will have a similar effect as using the /D switch on the command line (the define only becomes effective after the !define command).&lt;br /&gt;
&lt;br /&gt;
If /date or /utcdate are used, value will be passed into strftime and the result will be used as the value of gflag. strftime converts special symbols into certain parts of the current time or date. For example, %H will be converted into the current hour in 24-hour format. For a complete list of available symbols, search for strftime on MSDN. On POSIX, you can get the list by using man strftime.&lt;br /&gt;
&lt;br /&gt;
If /math is used, the result of &#039;val1 OP val2&#039;, where OP may be +,-,*,&amp;amp;,|,^,/ or % , will be used as the value of gflag. Note that val1 AND val2 MUST be integer values!&lt;br /&gt;
&lt;br /&gt;
If /file is used, the entire text file specified (including whitespace and newlines) will be read and stuffed into gflag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;!define USE_SOMETHING&lt;br /&gt;
!define VERSION 1.2&lt;br /&gt;
!define /date NOW &amp;quot;%H:%M:%S %d %b, %Y&amp;quot;&lt;br /&gt;
!define /math RESULT 3 + 10&lt;br /&gt;
!define /math REST 15 % ${RESULT}&lt;br /&gt;
!define /file BUNCHASTUFF somesourcefile.cpp&lt;br /&gt;
!define /redef USE_SOMETHING ${RESULT} ;redefine USE_SOMETHING&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== strftime Format ==&lt;br /&gt;
Format a time string as per, [https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx MSDN strftime] rules.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Code  Description&lt;br /&gt;
&lt;br /&gt;
%A    Full weekday name&lt;br /&gt;
%b    Abbreviated month name&lt;br /&gt;
%B    Full month name&lt;br /&gt;
%c    Date and time representation appropriate for locale&lt;br /&gt;
%d    Day of month as decimal number (01 – 31)&lt;br /&gt;
%H    Hour in 24-hour format (00 – 23)&lt;br /&gt;
%I    Hour in 12-hour format (01 – 12)&lt;br /&gt;
%j    Day of year as decimal number (001 – 366)&lt;br /&gt;
%m    Month as decimal number (01 – 12)&lt;br /&gt;
%M    Minute as decimal number (00 – 59)&lt;br /&gt;
%p    Current locale&#039;s A.M./P.M. indicator for 12-hour clock&lt;br /&gt;
%S    Second as decimal number (00 – 59)&lt;br /&gt;
%U    Week of year as decimal number, with Sunday as first day of week (00 – 53)&lt;br /&gt;
%w    Weekday as decimal number (0 – 6; Sunday is 0)&lt;br /&gt;
%W    Week of year as decimal number, with Monday as first day of week (00 – 53)&lt;br /&gt;
%x    Date representation for current locale&lt;br /&gt;
%X    Time representation for current locale&lt;br /&gt;
%y    Year without century, as decimal number (00 – 99)&lt;br /&gt;
%Y    Year with century, as decimal number&lt;br /&gt;
%z, %Z&lt;br /&gt;
      Either the time-zone name or time zone abbreviation, depending&lt;br /&gt;
      on registry settings; no characters if time zone is unknown&lt;br /&gt;
%%    Percent sign&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:Check_if_dir_is_empty&amp;diff=24773</id>
		<title>Talk:Check if dir is empty</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Talk:Check_if_dir_is_empty&amp;diff=24773"/>
		<updated>2016-05-29T23:16:10Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: /* Change suggestion for ALL files */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function worked great and really helped me out. Thank you very much!&lt;br /&gt;
&lt;br /&gt;
== Change suggestion for ALL files ==&lt;br /&gt;
&lt;br /&gt;
On line 5 of the script, &amp;lt;code&amp;gt;FindFirst $0 $1 &amp;quot;$0\*.*&amp;quot;&amp;lt;/code&amp;gt; doesn&#039;t actually find ALL files. What if the file is called, &amp;quot;README&amp;quot;, then it would not be found.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Suggestion:&#039;&#039;&#039;&lt;br /&gt;
* New: &amp;lt;code&amp;gt;FindFirst $0 $1 &amp;quot;$0\*&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Old: &amp;lt;code&amp;gt;FindFirst $0 $1 &amp;quot;$0\*.*&amp;quot;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=NSIS_Dialog_Designer&amp;diff=24032</id>
		<title>NSIS Dialog Designer</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=NSIS_Dialog_Designer&amp;diff=24032"/>
		<updated>2014-01-23T14:26:30Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: /* Download */  fixed link to take you directly to page (old link was broken)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Related_Software]]&lt;br /&gt;
NSIS Dialog Designer is an IDE that provides a graphical tool to easily design your custom setup pages for the great NSIS installer system.&lt;br /&gt;
&lt;br /&gt;
It supports MUI2 (Modern User Interface 2) dialogs and generates NSIS files ready to be included into your own *.nsi install script.&lt;br /&gt;
&lt;br /&gt;
[[File:ndd_screenshot.png|thumb|Screenshot]]&lt;br /&gt;
&lt;br /&gt;
NSIS Dialog Designer is still a work-in-progress; please test it and give me your feedback to let this tool suit your needs.&lt;br /&gt;
&lt;br /&gt;
Use this thread for comments:&lt;br /&gt;
http://forums.winamp.com/showthread.php?p=2764874#post2764874.&lt;br /&gt;
&lt;br /&gt;
== How does it work ==&lt;br /&gt;
NSIS Dialog Designer is a relatively simple IDE; if you&#039;re used to Visual Studio(TM) or Eclipse you&#039;ll feel at home.&lt;br /&gt;
Start by creating a new dialog (File | New), then add some controls to it by choosing them from the Toolbox.&lt;br /&gt;
Each control has properties and you can easily edit them into the property grid.&lt;br /&gt;
&lt;br /&gt;
When you save the dialog (suppose you called it Form1), NSIS Dialog Designer will create 2 separate files:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Form1.nsddef&#039;&#039;&#039; is the definition of your dialog in XML format; it contains all controls definitions and their properties&lt;br /&gt;
*&#039;&#039;&#039;Form1.nsdinc&#039;&#039;&#039; is an NSIS script containing all the NSIS commands needed to render your dialog; this is the file you&#039;ll include into your own NSIS setup script.&lt;br /&gt;
&lt;br /&gt;
== Supported controls ==&lt;br /&gt;
NSIS Dialog Designer actually supports the following controls:&lt;br /&gt;
*HLine&lt;br /&gt;
*VLine&lt;br /&gt;
*Label&lt;br /&gt;
*Icon&lt;br /&gt;
*Bitmap&lt;br /&gt;
*Link&lt;br /&gt;
*Button&lt;br /&gt;
*GroupBox&lt;br /&gt;
*CheckBox&lt;br /&gt;
*RadioButton&lt;br /&gt;
*Text&lt;br /&gt;
*Password&lt;br /&gt;
*Number&lt;br /&gt;
*ComboBox&lt;br /&gt;
*DropList&lt;br /&gt;
*ListBox&lt;br /&gt;
*ProgressBar&lt;br /&gt;
*DirRequest&lt;br /&gt;
*FileRequest&lt;br /&gt;
*RichEdit&lt;br /&gt;
&lt;br /&gt;
For each control you can set name, position and size, font, colors.&lt;br /&gt;
Controls also have events bindable to your own script functions.&lt;br /&gt;
&lt;br /&gt;
You can also provide your own script parts and fully customize the generated script.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
NSIS Dialog Designer is free and available here:&lt;br /&gt;
* http://coolsoft.altervista.org/en/nsisdialogdesigner&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
v.1.1.3 - 2013-12-16&lt;br /&gt;
FIX: Fixed generated script for DirRequest and FileRequest controls, not respecting CoordinateSystem.&lt;br /&gt;
&lt;br /&gt;
v.1.1.2 - 2013-01-11&lt;br /&gt;
FIX: Removed non-working color properties on ComboBox, CheckBox and RadioButton.&lt;br /&gt;
     See here for workarounds:&lt;br /&gt;
     ComboBox: http://forums.winamp.com/showpost.php?p=2174815&lt;br /&gt;
     CheckBox: http://forums.winamp.com/showpost.php?p=2354612&lt;br /&gt;
     RadioButton: http://forums.winamp.com/showpost.php?p=1974758&lt;br /&gt;
FIX: Multiline TextBox coordinates were always in pixels&lt;br /&gt;
FIX: TextBox creation script styles when Multiline=True&lt;br /&gt;
&lt;br /&gt;
v.1.1.1 - 2012-10-01&lt;br /&gt;
FIX: Fixed generated script for FileRequest control (wrong test on returned string).&lt;br /&gt;
&lt;br /&gt;
v.1.1.0 - 2012-09-14&lt;br /&gt;
NEW: Improved support for DialogIDs other than the default one (1018).&lt;br /&gt;
     User can now select 1044 (Welcome &amp;amp; Finish pages) and designer will change dialog size accordingly.&lt;br /&gt;
NEW: Added RichText control support. It does not support RTF text loading, it must be customized by&lt;br /&gt;
     the user (see here: http://forums.winamp.com/showthread.php?t=288129)&lt;br /&gt;
&lt;br /&gt;
v.1.0.0 - 2012-08-25&lt;br /&gt;
After a long time from latest one, it&#039;s now time to release the first stable version.&lt;br /&gt;
FIX: Text property of Number control now accepts numeric values and variable nalems (like $abc).&lt;br /&gt;
FIX: Minor cosmetic fixes.&lt;br /&gt;
&lt;br /&gt;
v.0.9.16 - 2012-04-20&lt;br /&gt;
FIX: SelectedItem property of ListBox, ComboBox and DropList controls now accepts any value (like $abc).&lt;br /&gt;
&lt;br /&gt;
v.0.9.15 - 2012-04-13&lt;br /&gt;
FIX: NullReference exception thrown when adding an HLine or VLine control.&lt;br /&gt;
&lt;br /&gt;
v.0.9.14 - 2012-03-20&lt;br /&gt;
NEW: Panel control, which is only a container for other controls&lt;br /&gt;
     (useful to create more than one RadioButtons group).&lt;br /&gt;
     It has no corresponding NSIS control, so no NSIS script if generated for it.&lt;br /&gt;
NEW: Added property &amp;quot;Checked&amp;quot; to RadioButton control.&lt;br /&gt;
     Only one RadioButton can be selected at once; if you need to create two (or more) different groups,&lt;br /&gt;
     you must include RadioButtons into a GroupBox or Panel control.&lt;br /&gt;
&lt;br /&gt;
v.0.9.13 - 2012-03-09&lt;br /&gt;
FIX: Wrong code generated for MaxLength property of TextBox control (thanks to fabpolli for bug report).&lt;br /&gt;
&lt;br /&gt;
v.0.9.12 - 2012-02-27&lt;br /&gt;
NEW: Added &amp;quot;Percentage&amp;quot; to the available NSIS coordinate systems.&lt;br /&gt;
NEW: Selection of NSIS coordinate system is now possible at control level, and for each&lt;br /&gt;
     component (X, Y, Width, Height). So now is possible to have different coordinate&lt;br /&gt;
     systems for different controls.&lt;br /&gt;
     Controls coordinate system default value is &amp;quot;Inherit&amp;quot;; this means that by default&lt;br /&gt;
     each control is rendered using the same coordinate system as the containing dialog.&lt;br /&gt;
&lt;br /&gt;
v.0.9.11 - 2012-02-11&lt;br /&gt;
NEW: NSIS scripts (*.nsdinc files) controls position and size values can now be selected&lt;br /&gt;
     between DU (Dialog units, the new default mode) and Pixels.&lt;br /&gt;
     The default coordinate system mode can be set into Options dialog.&lt;br /&gt;
NEW: Added 2 new controls: DirRequest and FileRequest.&lt;br /&gt;
&lt;br /&gt;
v.0.9.10 - 2011-11-23&lt;br /&gt;
FIX: Fixed bug that prevents opening forms where SetupType property is different from default value (Install).&lt;br /&gt;
FIX: IDE layout was not saved correctly and lost between version upgrades.&lt;br /&gt;
     Please reset layout (View | Reset layout), customize it then restart IDE to save correctly.&lt;br /&gt;
&lt;br /&gt;
v.0.9.9 - 2011-11-21&lt;br /&gt;
NEW: Added new &amp;quot;check updates&amp;quot; features: it periodically checks for new releases on CoolSoft website.&lt;br /&gt;
NEW: Script preview editor now preserves selection and cursor position after script changes and&lt;br /&gt;
     when switching between multiple opened dialogs.&lt;br /&gt;
NEW: TabIndex property can now be used to customize focus path through controls.&lt;br /&gt;
NEW: Added context menu to dialog designer, it shows Edit menu items.&lt;br /&gt;
NEW: Dialog .nsddef files are now created with UTF-8 encoding.&lt;br /&gt;
NEW: .nsddef and .nsdinc files now include NSISDialogDesigner version into header comments.&lt;br /&gt;
NEW: Duplicate font definitions are merged, generating only a single variable.&lt;br /&gt;
NEW: .nsddef files can now be opened by drag&amp;amp;drop from Windows Explorer.&lt;br /&gt;
NEW: IDE layout can now be reset through View menu item &amp;quot;Reset layout&amp;quot;.&lt;br /&gt;
FIX: Property are now stored into .nsddef only if value is different from default.&lt;br /&gt;
FIX: Fixed issue on copy/paste controls (duplicate control name).&lt;br /&gt;
FIX: User custom scripts won&#039;t be generated during debug, avoiding compile error due to missing functions.&lt;br /&gt;
&lt;br /&gt;
v.0.9.8 - 2011-09-12&lt;br /&gt;
NEW: Script editor/preview now has NSIS syntax highlighting and code folding,&lt;br /&gt;
thanks to FastColoredTextBox&lt;br /&gt;
(LGPL3 control, see here: http://www.codeproject.com/KB/edit/FastColoredTextBox_.aspx)&lt;br /&gt;
FIX: Styles property wrongly uses the value of ExStyles property.&lt;br /&gt;
&lt;br /&gt;
v.0.9.7 - 2011-09-11&lt;br /&gt;
NEW: Added support for Unicode into generated .nsdinc scripts (needs an Unicode version of NSIS).&lt;br /&gt;
NEW: New (self explaining) control properties: Visible and Enabled.&lt;br /&gt;
NEW: Dialog name (and so the corresponding NSIS variable) can now be set independently&lt;br /&gt;
     from its .nsddef filename. It could be set through the new &amp;quot;Name&amp;quot; dialog property.&lt;br /&gt;
FIX: Generated test script (the one compiled with F5) now checks user&lt;br /&gt;
     custom scripts to avoid redefining an already defined function.&lt;br /&gt;
     (thanks to Benjamin Richardson for reporting bug)&lt;br /&gt;
FIX: Fixed broken uninstall test script.&lt;br /&gt;
FIX: Some properties appear in bold into Property Grid, even if their&lt;br /&gt;
     value is the default one. This caused the generate script to be longer than required.&lt;br /&gt;
FIX: Custom script editor now accepts TAB key.&lt;br /&gt;
FIX: Script preview is cleared when closing the last dialog editor.&lt;br /&gt;
FIX: Fixed focus management issues that prevents DEL key to work into PropertyGrid.&lt;br /&gt;
&lt;br /&gt;
v.0.9.6 - 2011-06-28&lt;br /&gt;
NEW: Added new property SetupType to dialog, allowing the generated script to be used&lt;br /&gt;
     in both Install and Uninstall scripts.&lt;br /&gt;
NEW: Debugger code to debug Uninstaller dialogs.&lt;br /&gt;
FIX: Cleaned up the debug scripts.&lt;br /&gt;
&lt;br /&gt;
v.0.9.5 - 2011-06-16&lt;br /&gt;
BUG: Fixed key management preventing DEL key to be used inside PropertyGrid (thanks to Jovet for bug report)&lt;br /&gt;
NEW: Edit menu items now are enabled according to active content (designer, property, toolbox, ...)&lt;br /&gt;
NEW: DialogID and Size now are public properties (deedsmedia request)&lt;br /&gt;
     (can be reset to default values by right-clicking on PropertyGrid item)&lt;br /&gt;
&lt;br /&gt;
v.0.9.4 - 2011-05-29&lt;br /&gt;
BUG: Fixed permission issues on UAC enabled systems.&lt;br /&gt;
&lt;br /&gt;
v.0.9.3 - 2011-04-20&lt;br /&gt;
NEW: Added new properties ForeColor and BackColor&lt;br /&gt;
     (not working for: Button, ComboBox, DropList, GroupBox, HLine, VLine, ProgressBar)&lt;br /&gt;
NEW: Added new property Font&lt;br /&gt;
NEW: Designer now can show a grid (see Tools | Options menu)&lt;br /&gt;
BUG: Editor does not save dialogs when exiting with close button.&lt;br /&gt;
BUG: Script preview not updated when a new control is added&lt;br /&gt;
&lt;br /&gt;
v.0.9.2 - 2011-04-20&lt;br /&gt;
BUG: Missing property &amp;quot;Name&amp;quot; is now shown&lt;br /&gt;
     (Dialog does not have it because name is the same as its definition filename)&lt;br /&gt;
&lt;br /&gt;
v.0.9.1 - 2011-04-20&lt;br /&gt;
NEW: New dockable content with realtime NSIS generated script preview&lt;br /&gt;
&lt;br /&gt;
v.0.9.0 - 2011-04-18&lt;br /&gt;
First public release&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Driver_installation_and_update&amp;diff=22774</id>
		<title>Driver installation and update</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Driver_installation_and_update&amp;diff=22774"/>
		<updated>2013-01-16T00:00:58Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: /* The Header */ Added ALL constant definitions for UpdateDriverForPlugAndPlayDevices(..)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|kuba}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
I always thought it&#039;s not very nice nor professional to have users hunt for a driver when a device is attached to their system. Especially if there&#039;s some application software for that device that they install anyway.&lt;br /&gt;
&lt;br /&gt;
Wouldn&#039;t it be nice if the user could just install the software, which would install the driver automatically? And then they plug in their device and windows already knows where the driver is! It&#039;d be even better if the driver could be updated without having to disconnect the device, right? Well, the attached script does that too -- on 2000/XP, that is. For Vista and above try the MS [http://msdn.microsoft.com/en-us/library/ff550419%28v=vs.85%29.aspx  PnPUtil] utility.&lt;br /&gt;
&lt;br /&gt;
First, let&#039;s define some winapi functions. These go into drvsetup.nsh&lt;br /&gt;
&lt;br /&gt;
== The Header ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
  BOOL UpdateDriverForPlugAndPlayDevices(&lt;br /&gt;
    _In_opt_   HWND hwndParent,&lt;br /&gt;
    _In_       LPCTSTR HardwareId,&lt;br /&gt;
    _In_       LPCTSTR FullInfPath,&lt;br /&gt;
    _In_       DWORD InstallFlags,&lt;br /&gt;
    _Out_opt_  PBOOL bRebootRequired&lt;br /&gt;
  );&lt;br /&gt;
*/&lt;br /&gt;
!define sysUpdateDriverForPlugAndPlayDevices &amp;quot;newdev::UpdateDriverForPlugAndPlayDevices(i, t, t, i, *i) i&amp;quot;&lt;br /&gt;
!define NO_ERROR              0&lt;br /&gt;
!define ERROR_FILE_NOT_FOUND  2&lt;br /&gt;
!define ERROR_IN_WOW64        -536870347  ; 0xE0000235&lt;br /&gt;
!define ERROR_INVALID_FLAGS   1004        ; 0x3EC&lt;br /&gt;
!define ERROR_NO_SUCH_DEVINST -536870389  ; 0xE000020B&lt;br /&gt;
; the masked value of ERROR_NO_SUCH_DEVINST is 523&lt;br /&gt;
&lt;br /&gt;
!define INSTALLFLAG_FORCE           0x1&lt;br /&gt;
!define INSTALLFLAG_READONLY        0x2&lt;br /&gt;
!define INSTALLFLAG_NONINTERACTIVE  0x4&lt;br /&gt;
; Use FORCE flag ex: pushing an older release over top of new one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;BOOL SetupCopyOEMInf(PSTR, PSTR, DWORD, DWORD, PSTR, DWORD, PDWORD, PSTR);&lt;br /&gt;
!define sysSetupCopyOEMInf &amp;quot;setupapi::SetupCopyOEMInf(t, t, i, i, i, i, *i, t) i&amp;quot;&lt;br /&gt;
!define SPOST_NONE 0&lt;br /&gt;
!define SPOST_PATH 1&lt;br /&gt;
!define SPOST_URL 2&lt;br /&gt;
!define SP_COPY_DELETESOURCE 0x1&lt;br /&gt;
!define SP_COPY_REPLACEONLY 0x2&lt;br /&gt;
!define SP_COPY_NOOVERWRITE 0x8&lt;br /&gt;
!define SP_COPY_OEMINF_CATALOG_ONLY 0x40000&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then the actual function, which goes into driver.nsh. Note that it assumes you have [[Get_Windows_version|GetWindowsVersion]] function pasted into &amp;quot;winver.nsh&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== The Function ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!include &amp;quot;winver.nsh&amp;quot;&lt;br /&gt;
!include &amp;quot;drvsetup.nsh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Written by Kuba Ober&lt;br /&gt;
; Copyright (c) 2004 Kuba Ober&lt;br /&gt;
;&lt;br /&gt;
; Permission is hereby granted, free of charge, to any person obtaining a &lt;br /&gt;
; copy of this software and associated documentation files (the &amp;quot;Software&amp;quot;), &lt;br /&gt;
; to deal in the Software without restriction, including without limitation &lt;br /&gt;
; the rights to use, copy, modify, merge, publish, distribute, sublicense, &lt;br /&gt;
; and/or sell copies of the Software, and to permit persons to whom the &lt;br /&gt;
; Software is furnished to do so, subject to the following conditions:&lt;br /&gt;
;&lt;br /&gt;
; The above copyright notice and this permission notice shall be included in &lt;br /&gt;
; all copies or substantial portions of the Software.&lt;br /&gt;
; &lt;br /&gt;
; THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&lt;br /&gt;
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&lt;br /&gt;
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&lt;br /&gt;
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&lt;br /&gt;
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING&lt;br /&gt;
; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER&lt;br /&gt;
; DEALINGS IN THE SOFTWARE.&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; U S A G E&lt;br /&gt;
;&lt;br /&gt;
; Push &amp;quot;c:\program files\yoursoftware\driver&amp;quot; &lt;br /&gt;
;  -- the directory of the .inf file&lt;br /&gt;
; Push &amp;quot;c:\program files\yoursoftware\driver\driver.inf&amp;quot;&lt;br /&gt;
;  -- the filepath of the .inf file (directory + filename)&lt;br /&gt;
; Push &amp;quot;USB\VID_1234&amp;amp;PID_5678&amp;quot;&lt;br /&gt;
;  -- the HID (Hardware ID) of your device&lt;br /&gt;
; Call InstallUpgradeDriver&lt;br /&gt;
;&lt;br /&gt;
; Your driver (minimally the .inf and .sys files) should already by installed&lt;br /&gt;
; by your NSIS script.&lt;br /&gt;
;&lt;br /&gt;
; Typically, you would put the driver either in $INSTDIR or $INSTDIR\Driver&lt;br /&gt;
; It&#039;s up to you, of course.&lt;br /&gt;
;&lt;br /&gt;
; The driver (i.e. .inf, .sys and related files) must be present for the&lt;br /&gt;
; lifetime of your application, you shouldn&#039;t remove them after calling&lt;br /&gt;
; this function!&lt;br /&gt;
;&lt;br /&gt;
; You DON&#039;T want to put the driver in any of system directories. Windows&lt;br /&gt;
; will do it when the device is first plugged in.&lt;br /&gt;
&lt;br /&gt;
Function InstallUpgradeDriver&lt;br /&gt;
&lt;br /&gt;
 Pop $R0 ; HID&lt;br /&gt;
 Pop $R1 ; INFPATH&lt;br /&gt;
 Pop $R2 ; INFDIR&lt;br /&gt;
&lt;br /&gt;
 ; Get the Windows version&lt;br /&gt;
 Call GetWindowsVersion&lt;br /&gt;
 Pop $R3 ; Windows Version&lt;br /&gt;
 ;DetailPrint &#039;Windows Version: $R3&#039;&lt;br /&gt;
 StrCmp $R3 &#039;2000&#039; lbl_upgrade&lt;br /&gt;
 StrCmp $R3 &#039;XP&#039; lbl_upgrade&lt;br /&gt;
 StrCmp $R3 &#039;2003&#039; lbl_upgrade&lt;br /&gt;
 DetailPrint &amp;quot;Windows $R3 doesn&#039;t support automatic driver updates.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ; Upgrade the driver if the device is already plugged in&lt;br /&gt;
 Goto lbl_noupgrade&lt;br /&gt;
lbl_upgrade:&lt;br /&gt;
 System::Get &#039;${sysUpdateDriverForPlugAndPlayDevices}&#039;&lt;br /&gt;
 Pop $0&lt;br /&gt;
 StrCmp $0 &#039;error&#039; lbl_noapi&lt;br /&gt;
 DetailPrint &amp;quot;Updating the driver...&amp;quot;&lt;br /&gt;
 ; 0, HID, INFPATH, 0, 0&lt;br /&gt;
 Push $INSTDIR ; Otherwise this function will swallow it, dunno why&lt;br /&gt;
 System::Call &#039;${sysUpdateDriverForPlugAndPlayDevices}?e (0, R0, R1, 0, 0) .r0&#039;&lt;br /&gt;
 Pop $1 ; last error&lt;br /&gt;
 Pop $INSTDIR&lt;br /&gt;
 IntCmp $0 1 lbl_done&lt;br /&gt;
 IntCmp $1 ${ERROR_NO_SUCH_DEVINST} lbl_notplugged&lt;br /&gt;
&lt;br /&gt;
 DetailPrint &amp;quot;Driver update has failed. ($R3:$0,$1)&amp;quot;&lt;br /&gt;
 Goto lbl_noupgrade&lt;br /&gt;
lbl_notplugged:&lt;br /&gt;
 DetailPrint &amp;quot;The device is not plugged in, cannot update the driver.&amp;quot;&lt;br /&gt;
 Goto lbl_noupgrade&lt;br /&gt;
lbl_noapi:&lt;br /&gt;
 DetailPrint &amp;quot;Your Windows $R3 doesn&#039;t support driver updates.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
lbl_noupgrade:&lt;br /&gt;
 ; Pre-install the driver&lt;br /&gt;
 System::Get &#039;${sysSetupCopyOEMInf}&#039;&lt;br /&gt;
 Pop $0&lt;br /&gt;
 StrCmp $0 &#039;error&#039; lbl_inoapi&lt;br /&gt;
 DetailPrint &amp;quot;Installing the driver...&amp;quot;&lt;br /&gt;
 ; INFPATH, INFDIR, SPOST_PATH, &amp;quot;&amp;quot;, 0, 0, 0, 0&lt;br /&gt;
 System::Call &#039;${sysSetupCopyOEMInf}?e (R1, R2, ${SPOST_PATH}, 0, 0, 0, 0, 0) .r0&#039;&lt;br /&gt;
 Pop $1 ; last error&lt;br /&gt;
 IntCmp $0 1 lbl_nodriver&lt;br /&gt;
 DetailPrint &#039;Driver pre-installation has failed with error #$1 ($R3)&#039;&lt;br /&gt;
 Goto lbl_done&lt;br /&gt;
lbl_inoapi:&lt;br /&gt;
 DetailPrint &amp;quot;Your Windows $R3 doesn&#039;t support driver pre-installation.&amp;quot;&lt;br /&gt;
lbl_nodriver:&lt;br /&gt;
lbl_done:&lt;br /&gt;
&lt;br /&gt;
FunctionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:System Related Functions]]&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Useful_InstallOptions_and_MUI_macros&amp;diff=21961</id>
		<title>Useful InstallOptions and MUI macros</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Useful_InstallOptions_and_MUI_macros&amp;diff=21961"/>
		<updated>2012-05-17T18:12:50Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: /* sample.ini */ Changed NumFields from 16 to 15. It would not load in HM NIS Edit otherwise&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PageAuthor|bholliger}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
I created some macros that are useful for some InstallOptions tasks. Feel free to use and/or add your own macros as well. I hope they are useful.&lt;br /&gt;
&lt;br /&gt;
== General tips and hints for InstallOptions ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the field numbers define the tab-order this might change after adding another element to the dialog. Therefore I recommend using constants that hold the field names in a single location. This improves the general readability of the code as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
;----------------------&lt;br /&gt;
;defines for Dialog 1 - sample.ini&lt;br /&gt;
&lt;br /&gt;
  !define DIALOG1 &amp;quot;sample.ini&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  !define CHK_BLUE &amp;quot;Field 2&amp;quot;&lt;br /&gt;
  !define CHK_RED &amp;quot;Field 3&amp;quot;&lt;br /&gt;
  !define CHK_GREEN &amp;quot;Field 4&amp;quot;&lt;br /&gt;
  !define CHK_BROWN &amp;quot;Field 5&amp;quot;&lt;br /&gt;
  !define CHK_PROXYSETTINGS &amp;quot;Field 6&amp;quot;&lt;br /&gt;
  !define GRP_PROXYOPTIONS &amp;quot;Field 7&amp;quot;&lt;br /&gt;
  !define LBL_IPADDRESS &amp;quot;Field 8&amp;quot;&lt;br /&gt;
  !define TXT_IPADDRESS &amp;quot;Field 9&amp;quot;&lt;br /&gt;
  !define LBL_PORT1 &amp;quot;Field 10&amp;quot;&lt;br /&gt;
  !define TXT_PORT1 &amp;quot;Field 11&amp;quot;&lt;br /&gt;
  !define CHK_ENCRYPTION &amp;quot;Field 12&amp;quot;&lt;br /&gt;
  !define DRQ_NSISPATH &amp;quot;Field 14&amp;quot;&lt;br /&gt;
  !define CMD_AUTODETECTNSISPATH &amp;quot;Field 15&amp;quot;&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Macro: GROUPCONTROLS ==&lt;br /&gt;
&lt;br /&gt;
Activate a group of controls according to another control like a checkbox.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
; Activate a group of controls, depending on the state of one control&lt;br /&gt;
; &lt;br /&gt;
; Usage:&lt;br /&gt;
; &lt;br /&gt;
; eg. !insertmacro GROUPCONTROLS &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_PROXYSETTINGS}&amp;quot; &lt;br /&gt;
; &amp;quot;${LBL_IPADDRESS}|${TXT_IPADDRESS}|${LBL_PORT1}|${TXT_PORT1}|${CHK_ENCRYPTION}&amp;quot;&lt;br /&gt;
; FILE:          INI-file in $pluginsdir&lt;br /&gt;
; SOURCECONTROL: RadioButton, Checkbox&lt;br /&gt;
; CONTROLGROUP:  pipe delimited list of controls; ${BUTTON1}|${CHECKBOX}|${TEXTFIELD}&lt;br /&gt;
;&lt;br /&gt;
; Requires:&lt;br /&gt;
;&lt;br /&gt;
; !include &amp;quot;WordFunc.nsh&amp;quot;&lt;br /&gt;
; !insertmacro WordReplace&lt;br /&gt;
; !insertmacro WordFind&lt;br /&gt;
;&lt;br /&gt;
!macro GROUPCONTROLS FILE SOURCECONTROL CONTROLGROUP&lt;br /&gt;
  Push $R0 ;holds element&lt;br /&gt;
  Push $R1 ;counter&lt;br /&gt;
  Push $R2 ;state of the control&lt;br /&gt;
  Push $R3 ;flags of the control / hwnd of the control&lt;br /&gt;
  &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $R2 &amp;quot;${FILE}&amp;quot; &amp;quot;${SOURCECONTROL}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  StrCpy $R1 1&lt;br /&gt;
  ${Do}&lt;br /&gt;
    ClearErrors&lt;br /&gt;
    ${WordFind} &amp;quot;${CONTROLGROUP}&amp;quot; &amp;quot;|&amp;quot; &amp;quot;E+$R1&amp;quot; $R0&lt;br /&gt;
&lt;br /&gt;
    ${If} ${Errors}&lt;br /&gt;
    ${OrIf} $R0 == &amp;quot;&amp;quot;&lt;br /&gt;
      ${ExitDo}&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    ; Put state change in flags of element as well&lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $R3 &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;Flags&amp;quot;&lt;br /&gt;
    ${If} &amp;quot;$R2&amp;quot; == &amp;quot;1&amp;quot;&lt;br /&gt;
      ${WordReplace} $R3 &amp;quot;DISABLED&amp;quot; &amp;quot;&amp;quot; &amp;quot;+&amp;quot; $R3&lt;br /&gt;
       ${WordReplace} $R3 &amp;quot;||&amp;quot; &amp;quot;|&amp;quot; &amp;quot;+&amp;quot; $R3&lt;br /&gt;
      !insertmacro MUI_INSTALLOPTIONS_WRITE &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;Flags&amp;quot; $R3&lt;br /&gt;
    ${Else}&lt;br /&gt;
      !insertmacro MUI_INSTALLOPTIONS_WRITE &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;Flags&amp;quot; &amp;quot;$R3|DISABLED&amp;quot;&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $R3 &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;HWND&amp;quot;&lt;br /&gt;
    EnableWindow $R3 $R2&lt;br /&gt;
    &lt;br /&gt;
    IntOp $R1 $R1 + 1&lt;br /&gt;
  ${Loop}&lt;br /&gt;
&lt;br /&gt;
  Pop $R3&lt;br /&gt;
  Pop $R2&lt;br /&gt;
  Pop $R1&lt;br /&gt;
  Pop $R0&lt;br /&gt;
&lt;br /&gt;
!macroend&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Macro: CHANGETEXTFIELD ==&lt;br /&gt;
&lt;br /&gt;
Change the content of a textfield and write it to ini file. Ideal for autodetect purposes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
;change text field and put value in ini file&lt;br /&gt;
; &lt;br /&gt;
; Usage:&lt;br /&gt;
;&lt;br /&gt;
;  !insertmacro CHANGETEXTFIELD &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${DRQ_NSISPATH}&amp;quot; $tmp&lt;br /&gt;
;&lt;br /&gt;
; FILE:    INI-file in $pluginsdir&lt;br /&gt;
; ELEMENT: name of the control&lt;br /&gt;
; VALUE:   value that should appear in control&lt;br /&gt;
;&lt;br /&gt;
!macro CHANGETEXTFIELD FILE ELEMENT VALUE&lt;br /&gt;
  Push $R0 ; holds value&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_WRITE ${VALUE} &amp;quot;${FILE}&amp;quot; &amp;quot;${ELEMENT}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $R0 &amp;quot;${FILE}&amp;quot; &amp;quot;${ELEMENT}&amp;quot; &amp;quot;HWND&amp;quot;&lt;br /&gt;
  SendMessage $R0 ${WM_SETTEXT} 0 &amp;quot;STR:${VALUE}&amp;quot;&lt;br /&gt;
  Pop $R0&lt;br /&gt;
!macroend&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Macro: CHECKBOXCHECKER ==&lt;br /&gt;
&lt;br /&gt;
Counts the number of activated controls and displays an error message if there are not enough controls selected. Select 3 or 4 out of 6.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
; checks a group of checkboxes and counts how many of them&lt;br /&gt;
; are activated.&lt;br /&gt;
;&lt;br /&gt;
; Usage:&lt;br /&gt;
;&lt;br /&gt;
; Create a langstring containing an error message&lt;br /&gt;
; eg. LangString TEXT_LIMITATIONSEXEEDED ${LANG_ENGLISH} &amp;quot;Choose either two or three colours!&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
; eg. !insertmacro CHECKBOXCHECKER &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_BLUE}|${CHK_RED}|${CHK_GREEN}|${CHK_BROWN}&amp;quot; 2 3&lt;br /&gt;
;&lt;br /&gt;
; FILE:          INI-file in $pluginsdir&lt;br /&gt;
; CONTROLGROUP:  pipe delimited list of controls; ${BUTTON1}|${CHECKBOX}|${TEXTFIELD}&lt;br /&gt;
; MIN/MAX:       at least ${MIN} and no more than ${MAX} controls must be in activated state&lt;br /&gt;
;&lt;br /&gt;
; Requires:&lt;br /&gt;
;&lt;br /&gt;
; !include &amp;quot;WordFunc.nsh&amp;quot;&lt;br /&gt;
; !insertmacro WordFind&lt;br /&gt;
;&lt;br /&gt;
!macro CHECKBOXCHECKER FILE CONTROLGROUP MIN MAX&lt;br /&gt;
&lt;br /&gt;
  Push $R0 ;holds element&lt;br /&gt;
  Push $R1 ;counter&lt;br /&gt;
  Push $R2 ;count activated elements&lt;br /&gt;
  Push $R3 ;state of the control&lt;br /&gt;
  &lt;br /&gt;
  StrCpy $R1 1&lt;br /&gt;
  StrCpy $R2 0&lt;br /&gt;
  ${Do}&lt;br /&gt;
    ClearErrors&lt;br /&gt;
    ${WordFind} &amp;quot;${CONTROLGROUP}&amp;quot; &amp;quot;|&amp;quot; &amp;quot;E+$R1&amp;quot; $R0&lt;br /&gt;
&lt;br /&gt;
    ${If} ${Errors}&lt;br /&gt;
    ${OrIf} $R0 == &amp;quot;&amp;quot;&lt;br /&gt;
      ${ExitDo}&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    ; Put state change in flags of element as well&lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $R3 &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    ${If} &amp;quot;$R3&amp;quot; == &amp;quot;1&amp;quot;&lt;br /&gt;
      IntOp $R2 $R2 + 1&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    IntOp $R1 $R1 + 1&lt;br /&gt;
  ${Loop}&lt;br /&gt;
&lt;br /&gt;
  ${If} $R2 &amp;lt; ${MIN}&lt;br /&gt;
  ${OrIf} $R2 &amp;gt; ${MAX}&lt;br /&gt;
    MessageBox MB_OK|MB_ICONSTOP &amp;quot;$(TEXT_LIMITATIONSEXCEEDED)&amp;quot;&lt;br /&gt;
    Abort&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
&lt;br /&gt;
  Pop $R3&lt;br /&gt;
  Pop $R2&lt;br /&gt;
  Pop $R1&lt;br /&gt;
  Pop $R0&lt;br /&gt;
&lt;br /&gt;
!macroend&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample ==&lt;br /&gt;
&lt;br /&gt;
Have a look at the sample.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
;---------------------&lt;br /&gt;
;Include Modern UI&lt;br /&gt;
&lt;br /&gt;
  !include &amp;quot;MUI.nsh&amp;quot;&lt;br /&gt;
  !include &amp;quot;LogicLib.nsh&amp;quot;&lt;br /&gt;
;----------------------&lt;br /&gt;
;defines for Dialog 1 - sample.ini&lt;br /&gt;
&lt;br /&gt;
  !define DIALOG1 &amp;quot;sample.ini&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  !define CHK_BLUE &amp;quot;Field 2&amp;quot;&lt;br /&gt;
  !define CHK_RED &amp;quot;Field 3&amp;quot;&lt;br /&gt;
  !define CHK_GREEN &amp;quot;Field 4&amp;quot;&lt;br /&gt;
  !define CHK_BROWN &amp;quot;Field 5&amp;quot;&lt;br /&gt;
  !define CHK_PROXYSETTINGS &amp;quot;Field 6&amp;quot;&lt;br /&gt;
  !define GRP_PROXYOPTIONS &amp;quot;Field 7&amp;quot;&lt;br /&gt;
  !define LBL_IPADDRESS &amp;quot;Field 8&amp;quot;&lt;br /&gt;
  !define TXT_IPADDRESS &amp;quot;Field 9&amp;quot;&lt;br /&gt;
  !define LBL_PORT1 &amp;quot;Field 10&amp;quot;&lt;br /&gt;
  !define TXT_PORT1 &amp;quot;Field 11&amp;quot;&lt;br /&gt;
  !define CHK_ENCRYPTION &amp;quot;Field 12&amp;quot;&lt;br /&gt;
  !define DRQ_NSISPATH &amp;quot;Field 14&amp;quot;&lt;br /&gt;
  !define CMD_AUTODETECTNSISPATH &amp;quot;Field 15&amp;quot;&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;General&lt;br /&gt;
&lt;br /&gt;
  ;Name and file&lt;br /&gt;
  Name &amp;quot;MUI installation validation example&amp;quot;&lt;br /&gt;
  OutFile &amp;quot;test.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  ;Default installation folder&lt;br /&gt;
  InstallDir &amp;quot;$PROGRAMFILES\MUI validate&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  ;Get installation folder from registry if available&lt;br /&gt;
  InstallDirRegKey HKCU &amp;quot;Software\MUI validate&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Pages&lt;br /&gt;
&lt;br /&gt;
  Page custom InitPage ValidatePage&lt;br /&gt;
  !insertmacro MUI_PAGE_DIRECTORY&lt;br /&gt;
  !insertmacro MUI_PAGE_INSTFILES&lt;br /&gt;
 &lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Interface Settings&lt;br /&gt;
&lt;br /&gt;
  !define MUI_ABORTWARNING&lt;br /&gt;
  &lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Languages&lt;br /&gt;
 &lt;br /&gt;
  !insertmacro MUI_LANGUAGE &amp;quot;English&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Reserve Files&lt;br /&gt;
  &lt;br /&gt;
  ;If you are using solid compression, files that are required before&lt;br /&gt;
  ;the actual installation should be stored first in the data block,&lt;br /&gt;
  ;because this will make your installer start faster.&lt;br /&gt;
  &lt;br /&gt;
  ReserveFile &amp;quot;sample.ini&amp;quot;&lt;br /&gt;
  !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Variables&lt;br /&gt;
&lt;br /&gt;
  Var &amp;quot;tmp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!include &amp;quot;WordFunc.nsh&amp;quot;&lt;br /&gt;
!insertmacro WordReplace&lt;br /&gt;
!insertmacro WordFind&lt;br /&gt;
&lt;br /&gt;
; Activate a group of controls, depending on the state of one control&lt;br /&gt;
; &lt;br /&gt;
; Usage:&lt;br /&gt;
; &lt;br /&gt;
; eg. !insertmacro GROUPCONTROLS &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_PROXYSETTINGS}&amp;quot; &amp;quot;${LBL_IPADDRESS}|${TXT_IPADDRESS}|${LBL_PORT1}|${TXT_PORT1}|${CHK_ENCRYPTION}&amp;quot;&lt;br /&gt;
; FILE:          INI-file in $pluginsdir&lt;br /&gt;
; SOURCECONTROL: RadioButton, Checkbox&lt;br /&gt;
; CONTROLGROUP:  pipe delimited list of controls; ${BUTTON1}|${CHECKBOX}|${TEXTFIELD}&lt;br /&gt;
;&lt;br /&gt;
; Requires:&lt;br /&gt;
;&lt;br /&gt;
; !include &amp;quot;WordFunc.nsh&amp;quot;&lt;br /&gt;
; !insertmacro WordReplace&lt;br /&gt;
; !insertmacro WordFind&lt;br /&gt;
;&lt;br /&gt;
!macro GROUPCONTROLS FILE SOURCECONTROL CONTROLGROUP&lt;br /&gt;
  Push $R0 ;holds element&lt;br /&gt;
  Push $R1 ;counter&lt;br /&gt;
  Push $R2 ;state of the control&lt;br /&gt;
  Push $R3 ;flags of the control / hwnd of the control&lt;br /&gt;
  &lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $R2 &amp;quot;${FILE}&amp;quot; &amp;quot;${SOURCECONTROL}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  StrCpy $R1 1&lt;br /&gt;
  ${Do}&lt;br /&gt;
    ClearErrors&lt;br /&gt;
    ${WordFind} &amp;quot;${CONTROLGROUP}&amp;quot; &amp;quot;|&amp;quot; &amp;quot;E+$R1&amp;quot; $R0&lt;br /&gt;
&lt;br /&gt;
    ${If} ${Errors}&lt;br /&gt;
    ${OrIf} $R0 == &amp;quot;&amp;quot;&lt;br /&gt;
      ${ExitDo}&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    ; Put state change in flags of element as well&lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $R3 &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;Flags&amp;quot;&lt;br /&gt;
    ${If} &amp;quot;$R2&amp;quot; == &amp;quot;1&amp;quot;&lt;br /&gt;
      ${WordReplace} $R3 &amp;quot;DISABLED&amp;quot; &amp;quot;&amp;quot; &amp;quot;+&amp;quot; $R3&lt;br /&gt;
       ${WordReplace} $R3 &amp;quot;||&amp;quot; &amp;quot;|&amp;quot; &amp;quot;+&amp;quot; $R3&lt;br /&gt;
      !insertmacro MUI_INSTALLOPTIONS_WRITE &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;Flags&amp;quot; $R3&lt;br /&gt;
    ${Else}&lt;br /&gt;
      !insertmacro MUI_INSTALLOPTIONS_WRITE &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;Flags&amp;quot; &amp;quot;$R3|DISABLED&amp;quot;&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $R3 &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;HWND&amp;quot;&lt;br /&gt;
    EnableWindow $R3 $R2&lt;br /&gt;
    &lt;br /&gt;
    IntOp $R1 $R1 + 1&lt;br /&gt;
  ${Loop}&lt;br /&gt;
&lt;br /&gt;
  Pop $R3&lt;br /&gt;
  Pop $R2&lt;br /&gt;
  Pop $R1&lt;br /&gt;
  Pop $R0&lt;br /&gt;
&lt;br /&gt;
!macroend&lt;br /&gt;
&lt;br /&gt;
;change text field and put value in ini file&lt;br /&gt;
; &lt;br /&gt;
; Usage:&lt;br /&gt;
;&lt;br /&gt;
;  !insertmacro CHANGETEXTFIELD &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${DRQ_NSISPATH}&amp;quot; $tmp&lt;br /&gt;
;&lt;br /&gt;
; FILE:    INI-file in $pluginsdir&lt;br /&gt;
; ELEMENT: name of the control&lt;br /&gt;
; VALUE:   value that should appear in control&lt;br /&gt;
;&lt;br /&gt;
!macro CHANGETEXTFIELD FILE ELEMENT VALUE&lt;br /&gt;
  Push $R0 ; holds value&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_WRITE ${VALUE} &amp;quot;${FILE}&amp;quot; &amp;quot;${ELEMENT}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $R0 &amp;quot;${FILE}&amp;quot; &amp;quot;${ELEMENT}&amp;quot; &amp;quot;HWND&amp;quot;&lt;br /&gt;
  SendMessage $R0 ${WM_SETTEXT} 0 &amp;quot;STR:${VALUE}&amp;quot;&lt;br /&gt;
  Pop $R0&lt;br /&gt;
!macroend&lt;br /&gt;
&lt;br /&gt;
; checks a group of checkboxes and counts how many of them&lt;br /&gt;
; are activated.&lt;br /&gt;
;&lt;br /&gt;
; Usage:&lt;br /&gt;
;&lt;br /&gt;
; Create a langstring containing an error message&lt;br /&gt;
; eg. LangString TEXT_LIMITATIONSEXEEDED ${LANG_ENGLISH} &amp;quot;Choose either two or three colours!&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
; eg. !insertmacro CHECKBOXCHECKER &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_BLUE}|${CHK_RED}|${CHK_GREEN}|${CHK_BROWN}&amp;quot; 2 3&lt;br /&gt;
;&lt;br /&gt;
; FILE:          INI-file in $pluginsdir&lt;br /&gt;
; CONTROLGROUP:  pipe delimited list of controls; ${BUTTON1}|${CHECKBOX}|${TEXTFIELD}&lt;br /&gt;
; MIN/MAX:       at least ${MIN} and no more than ${MAX} controls must be in activated state&lt;br /&gt;
;&lt;br /&gt;
; Requires:&lt;br /&gt;
;&lt;br /&gt;
; !include &amp;quot;WordFunc.nsh&amp;quot;&lt;br /&gt;
; !insertmacro WordFind&lt;br /&gt;
;&lt;br /&gt;
!macro CHECKBOXCHECKER FILE CONTROLGROUP MIN MAX&lt;br /&gt;
&lt;br /&gt;
  Push $R0 ;holds element&lt;br /&gt;
  Push $R1 ;counter&lt;br /&gt;
  Push $R2 ;count activated elements&lt;br /&gt;
  Push $R3 ;state of the control&lt;br /&gt;
  &lt;br /&gt;
  StrCpy $R1 1&lt;br /&gt;
  StrCpy $R2 0&lt;br /&gt;
  ${Do}&lt;br /&gt;
    ClearErrors&lt;br /&gt;
    ${WordFind} &amp;quot;${CONTROLGROUP}&amp;quot; &amp;quot;|&amp;quot; &amp;quot;E+$R1&amp;quot; $R0&lt;br /&gt;
&lt;br /&gt;
    ${If} ${Errors}&lt;br /&gt;
    ${OrIf} $R0 == &amp;quot;&amp;quot;&lt;br /&gt;
      ${ExitDo}&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    ; Put state change in flags of element as well&lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $R3 &amp;quot;${FILE}&amp;quot; &amp;quot;$R0&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    ${If} &amp;quot;$R3&amp;quot; == &amp;quot;1&amp;quot;&lt;br /&gt;
      IntOp $R2 $R2 + 1&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
&lt;br /&gt;
    IntOp $R1 $R1 + 1&lt;br /&gt;
  ${Loop}&lt;br /&gt;
&lt;br /&gt;
  ${If} $R2 &amp;lt; ${MIN}&lt;br /&gt;
  ${OrIf} $R2 &amp;gt; ${MAX}&lt;br /&gt;
    MessageBox MB_OK|MB_ICONSTOP &amp;quot;$(TEXT_LIMITATIONSEXCEEDED)&amp;quot;&lt;br /&gt;
    Abort&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
&lt;br /&gt;
  Pop $R3&lt;br /&gt;
  Pop $R2&lt;br /&gt;
  Pop $R1&lt;br /&gt;
  Pop $R0&lt;br /&gt;
&lt;br /&gt;
!macroend&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Installer Sections&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Dummy Section&amp;quot; SecDummy&lt;br /&gt;
&lt;br /&gt;
  SetOutPath &amp;quot;$INSTDIR&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  ;ADD YOUR OWN FILES HERE...&lt;br /&gt;
&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
;--------------------------------&lt;br /&gt;
;Installer Functions&lt;br /&gt;
&lt;br /&gt;
Function .onInit&lt;br /&gt;
&lt;br /&gt;
;  !insertmacro MUI_LANGDLL_DISPLAY&lt;br /&gt;
&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
LangString TEXT_IO_TITLE ${LANG_ENGLISH} &amp;quot;Test page&amp;quot;&lt;br /&gt;
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} &amp;quot;Test some things&amp;quot;&lt;br /&gt;
LangString TEXT_LIMITATIONSEXCEEDED ${LANG_ENGLISH} &amp;quot;Choose either two or three colours!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Function InitPage&lt;br /&gt;
&lt;br /&gt;
  ;Extract InstallOptions INI files&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_EXTRACT &amp;quot;${DIALOG1}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  !insertmacro MUI_HEADER_TEXT &amp;quot;$(TEXT_IO_TITLE)&amp;quot; &amp;quot;$(TEXT_IO_SUBTITLE)&amp;quot;&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_INITDIALOG &amp;quot;${DIALOG1}&amp;quot;&lt;br /&gt;
  !insertmacro GROUPCONTROLS &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_PROXYSETTINGS}&amp;quot; &amp;quot;${LBL_IPADDRESS}|${TXT_IPADDRESS}|${LBL_PORT1}|${TXT_PORT1}|${CHK_ENCRYPTION}&amp;quot;&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_SHOW  &lt;br /&gt;
&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
Function ValidatePage&lt;br /&gt;
  ; handle notify event of element&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $tmp &amp;quot;${DIALOG1}&amp;quot; &amp;quot;Settings&amp;quot; &amp;quot;State&amp;quot;  &lt;br /&gt;
  ${Switch} &amp;quot;Field $tmp&amp;quot;&lt;br /&gt;
    ${Case} &amp;quot;${CHK_PROXYSETTINGS}&amp;quot;&lt;br /&gt;
      !insertmacro GROUPCONTROLS &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_PROXYSETTINGS}&amp;quot; &amp;quot;${LBL_IPADDRESS}|${TXT_IPADDRESS}|${LBL_PORT1}|${TXT_PORT1}|${CHK_ENCRYPTION}&amp;quot;&lt;br /&gt;
      Abort&lt;br /&gt;
    ${Case} &amp;quot;${CMD_AUTODETECTNSISPATH}&amp;quot;&lt;br /&gt;
      ;read registry value and set text field&lt;br /&gt;
      ReadRegStr $tmp HKLM &amp;quot;Software\NSIS&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
      !insertmacro CHANGETEXTFIELD &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${DRQ_NSISPATH}&amp;quot; $tmp&lt;br /&gt;
      Abort      &lt;br /&gt;
  ${EndSwitch}&lt;br /&gt;
  &lt;br /&gt;
  ; check if 2 or 3 check boxes are activated&lt;br /&gt;
  !insertmacro CHECKBOXCHECKER &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_BLUE}|${CHK_RED}|${CHK_GREEN}|${CHK_BROWN}&amp;quot; 2 3&lt;br /&gt;
&lt;br /&gt;
  ;  check if checkbox is activated&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $tmp &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${CHK_PROXYSETTINGS}&amp;quot; &amp;quot;State&amp;quot;  &lt;br /&gt;
  ${If} $tmp == 1&lt;br /&gt;
    Var /GLOBAL ip1&lt;br /&gt;
    Var /GLOBAL port1&lt;br /&gt;
  &lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $ip1 &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${TXT_IPADDRESS}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    Push &amp;quot;$ip1&amp;quot;&lt;br /&gt;
    Call ValidateIP&lt;br /&gt;
    ${If} ${Errors}&lt;br /&gt;
      MessageBox MB_ICONEXCLAMATION &amp;quot;IP not correct! $ip1&amp;quot;&lt;br /&gt;
      Abort&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
  &lt;br /&gt;
    !insertmacro MUI_INSTALLOPTIONS_READ $port1 &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${TXT_PORT1}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
    ${If} $port1 &amp;lt; 1024&lt;br /&gt;
    ${OrIf} $port1 &amp;gt; 32768&lt;br /&gt;
      MessageBox MB_ICONEXCLAMATION &amp;quot;Port not valid!&amp;quot;&lt;br /&gt;
      Abort&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
  &lt;br /&gt;
  ; check for file in NSIS&#039; path&lt;br /&gt;
  !insertmacro MUI_INSTALLOPTIONS_READ $tmp &amp;quot;${DIALOG1}&amp;quot; &amp;quot;${DRQ_NSISPATH}&amp;quot; &amp;quot;State&amp;quot;&lt;br /&gt;
  ${Unless} ${FileExists} &amp;quot;$tmp\makensis.exe&amp;quot;&lt;br /&gt;
    MessageBox MB_OK|MB_ICONEXCLAMATION &amp;quot;makensis.exe in NSIS path not found!&amp;quot;&lt;br /&gt;
    Abort&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
   &lt;br /&gt;
  ; TODO: save values to ini file/registry...&lt;br /&gt;
    &lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
; http://nsis.sourceforge.net/Validate_IP_function&lt;br /&gt;
!include WordFunc.nsh&lt;br /&gt;
 &lt;br /&gt;
!insertmacro WordFind&lt;br /&gt;
!insertmacro StrFilter&lt;br /&gt;
Function ValidateIP&lt;br /&gt;
 &lt;br /&gt;
  Exch $0&lt;br /&gt;
  Push $1&lt;br /&gt;
  Push $2&lt;br /&gt;
 &lt;br /&gt;
  ${StrFilter} $0 1 &amp;quot;.&amp;quot; &amp;quot;&amp;quot; $1&lt;br /&gt;
  ${If} $0 != $1&lt;br /&gt;
    # invalid charcaters used&lt;br /&gt;
    #   example: a127.0.0.1&lt;br /&gt;
    Goto error&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
 &lt;br /&gt;
  ${WordFind} $0 . &amp;quot;#&amp;quot; $1&lt;br /&gt;
  ${If} $1 != 4&lt;br /&gt;
    # wrong number of numbers&lt;br /&gt;
    #   example: 127.0.0.&lt;br /&gt;
    Goto error&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
 &lt;br /&gt;
  ${WordFind} $0 . &amp;quot;*&amp;quot; $1&lt;br /&gt;
  ${If} $1 != 3&lt;br /&gt;
    # wrong number of dots&lt;br /&gt;
    #   example: 127.0.0.1.&lt;br /&gt;
    Goto error&lt;br /&gt;
  ${EndIf}&lt;br /&gt;
 &lt;br /&gt;
  ${For} $2 1 4&lt;br /&gt;
    ${WordFind} $0 . +$2 $1&lt;br /&gt;
 &lt;br /&gt;
    ${If} $1 &amp;gt; 255&lt;br /&gt;
    ${OrIf} $1 &amp;lt; 0&lt;br /&gt;
      # invalid number&lt;br /&gt;
      #   example: 500.0.0.1&lt;br /&gt;
      Goto error&lt;br /&gt;
    ${EndIf}&lt;br /&gt;
  ${Next}&lt;br /&gt;
 &lt;br /&gt;
  Pop $2&lt;br /&gt;
  Pop $1&lt;br /&gt;
  Pop $0&lt;br /&gt;
 &lt;br /&gt;
  ClearErrors&lt;br /&gt;
 &lt;br /&gt;
  Return&lt;br /&gt;
 &lt;br /&gt;
  error:&lt;br /&gt;
 &lt;br /&gt;
    Pop $2&lt;br /&gt;
    Pop $1&lt;br /&gt;
    Pop $0&lt;br /&gt;
 &lt;br /&gt;
    SetErrors&lt;br /&gt;
 &lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== sample.ini ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
; Ini file generated by the HM NIS Edit IO designer.&lt;br /&gt;
[Settings]&lt;br /&gt;
NumFields=15&lt;br /&gt;
&lt;br /&gt;
[Field 1]&lt;br /&gt;
Type=Groupbox&lt;br /&gt;
Text=Colour (choose 2 or 3)&lt;br /&gt;
Left=0&lt;br /&gt;
Right=112&lt;br /&gt;
Top=0&lt;br /&gt;
Bottom=56&lt;br /&gt;
&lt;br /&gt;
[Field 2]&lt;br /&gt;
Type=CheckBox&lt;br /&gt;
Text=&amp;amp;Blue&lt;br /&gt;
Left=5&lt;br /&gt;
Right=80&lt;br /&gt;
Top=10&lt;br /&gt;
Bottom=20&lt;br /&gt;
State=0&lt;br /&gt;
&lt;br /&gt;
[Field 3]&lt;br /&gt;
Type=CheckBox&lt;br /&gt;
Text=&amp;amp;Red&lt;br /&gt;
Left=5&lt;br /&gt;
Right=80&lt;br /&gt;
Top=20&lt;br /&gt;
Bottom=30&lt;br /&gt;
&lt;br /&gt;
[Field 4]&lt;br /&gt;
Type=CheckBox&lt;br /&gt;
Text=&amp;amp;Green&lt;br /&gt;
Left=5&lt;br /&gt;
Right=80&lt;br /&gt;
Top=30&lt;br /&gt;
Bottom=40&lt;br /&gt;
&lt;br /&gt;
[Field 5]&lt;br /&gt;
Type=CheckBox&lt;br /&gt;
Text=&amp;amp;Brown&lt;br /&gt;
Left=5&lt;br /&gt;
Right=79&lt;br /&gt;
Top=40&lt;br /&gt;
Bottom=49&lt;br /&gt;
&lt;br /&gt;
[Field 6]&lt;br /&gt;
Type=Checkbox&lt;br /&gt;
Text=&amp;amp;Set proxy options (NOTIFY)&lt;br /&gt;
Flags=NOTIFY&lt;br /&gt;
Left=117&lt;br /&gt;
Right=225&lt;br /&gt;
Top=0&lt;br /&gt;
Bottom=10&lt;br /&gt;
&lt;br /&gt;
[Field 7]&lt;br /&gt;
Type=Groupbox&lt;br /&gt;
Left=117&lt;br /&gt;
Right=-1&lt;br /&gt;
Top=10&lt;br /&gt;
Bottom=56&lt;br /&gt;
Text=Proxy options&lt;br /&gt;
&lt;br /&gt;
[Field 8]&lt;br /&gt;
Type=Label&lt;br /&gt;
Text=&amp;amp;IP-Address:&lt;br /&gt;
Left=122&lt;br /&gt;
Right=165&lt;br /&gt;
Top=22&lt;br /&gt;
Bottom=30&lt;br /&gt;
&lt;br /&gt;
[Field 9]&lt;br /&gt;
Type=Text&lt;br /&gt;
Left=122&lt;br /&gt;
Right=240&lt;br /&gt;
Top=30&lt;br /&gt;
Bottom=42&lt;br /&gt;
&lt;br /&gt;
[Field 10]&lt;br /&gt;
Type=Label&lt;br /&gt;
Text=&amp;amp;Port:&lt;br /&gt;
Left=244&lt;br /&gt;
Right=264&lt;br /&gt;
Top=22&lt;br /&gt;
Bottom=30&lt;br /&gt;
&lt;br /&gt;
[Field 11]&lt;br /&gt;
Type=Text&lt;br /&gt;
Left=244&lt;br /&gt;
Right=-10&lt;br /&gt;
Top=30&lt;br /&gt;
Bottom=42&lt;br /&gt;
&lt;br /&gt;
[Field 12]&lt;br /&gt;
Type=Checkbox&lt;br /&gt;
Text=&amp;amp;Use encryption&lt;br /&gt;
Left=122&lt;br /&gt;
Right=187&lt;br /&gt;
Top=44&lt;br /&gt;
Bottom=54&lt;br /&gt;
&lt;br /&gt;
[Field 13]&lt;br /&gt;
Type=Groupbox&lt;br /&gt;
Text=Set NSIS path or click autodetect&lt;br /&gt;
Left=117&lt;br /&gt;
Right=-1&lt;br /&gt;
Top=61&lt;br /&gt;
Bottom=116&lt;br /&gt;
&lt;br /&gt;
[Field 14]&lt;br /&gt;
Type=DirRequest&lt;br /&gt;
Left=122&lt;br /&gt;
Right=-10&lt;br /&gt;
Top=77&lt;br /&gt;
Bottom=89&lt;br /&gt;
&lt;br /&gt;
[Field 15]&lt;br /&gt;
Type=Button&lt;br /&gt;
Text=&amp;amp;Autodetect&lt;br /&gt;
Flags=NOTIFY&lt;br /&gt;
Left=245&lt;br /&gt;
Right=-10&lt;br /&gt;
Top=92&lt;br /&gt;
Bottom=106&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Project_Procyon&amp;diff=21944</id>
		<title>Project Procyon</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Project_Procyon&amp;diff=21944"/>
		<updated>2012-05-08T23:32:35Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: line formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
The auto-updater used in [http://procyon.surrealearth.info/ Project Procyon].&lt;br /&gt;
&lt;br /&gt;
This work is licensed under a [http://creativecommons.org/licenses/by-nc/3.0/ Creative Commons Attribution-NonCommercial 3.0 Unported License].&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
; NSIS script for Project Procyon Alpha Launcher&lt;br /&gt;
; Written in 2010 by Troy Martin for Project Procyon.&lt;br /&gt;
; Project Procyon site: http://procyon.surrealearth.info/&lt;br /&gt;
; Licensed under a Creative Commons Attribution-NonCommercial 3.0 License.&lt;br /&gt;
; See http://creativecommons.org/licenses/by-nc/3.0/ for license details.&lt;br /&gt;
&lt;br /&gt;
; String defines&lt;br /&gt;
!define PRODUCT_NAME &amp;quot;Project Procyon&amp;quot;&lt;br /&gt;
!define PRODUCT_VERSION &amp;quot;Alpha&amp;quot;&lt;br /&gt;
!define PRODUCT_PUBLISHER &amp;quot;Surreal Earth Studios&amp;quot;&lt;br /&gt;
!define PRODUCT_WEB_SITE &amp;quot;http://procyon.surrealearth.info/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
RequestExecutionLevel user  ; It works better without wanting admin privs.&lt;br /&gt;
Icon &amp;quot;procyon.ico&amp;quot;&lt;br /&gt;
BrandingText &amp;quot; &amp;quot;            ; Remove the NSIS branding text&lt;br /&gt;
&lt;br /&gt;
!include &amp;quot;UAC.nsh&amp;quot;  ; I don&#039;t know why this is included.&lt;br /&gt;
&lt;br /&gt;
Name &amp;quot;${PRODUCT_NAME} ${PRODUCT_VERSION}&amp;quot;&lt;br /&gt;
OutFile &amp;quot;procyon.exe&amp;quot;&lt;br /&gt;
InstallDir &amp;quot;$PROGRAMFILES\Project Procyon&amp;quot;&lt;br /&gt;
ShowInstDetails show&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;MainSection&amp;quot; SEC01&lt;br /&gt;
&lt;br /&gt;
        IfFileExists &amp;quot;$AppData\Procyon\*.*&amp;quot; +2  ; Procyon goes into AppData for ease&lt;br /&gt;
        CreateDirectory &amp;quot;$AppData\Procyon&amp;quot;      ; of launching and updating.&lt;br /&gt;
        &lt;br /&gt;
        ; Future revisions may include launcher auto-update. Code is written, but no&lt;br /&gt;
        ; launcher update files are on the Procyon server yet.&lt;br /&gt;
        &lt;br /&gt;
        ; You can always add &amp;quot;Call DetectLauncherUpdate&amp;quot; here, but the code in that&lt;br /&gt;
        ; function and related functions are not tested.&lt;br /&gt;
        &lt;br /&gt;
        Call DetectProcyonUpdate  ; All the code for the launcher is function-based.&lt;br /&gt;
&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Section -Post&lt;br /&gt;
SectionEnd&lt;br /&gt;
&lt;br /&gt;
Function RunProcyon&lt;br /&gt;
        IfFileExists &amp;quot;$AppData\Procyon\procyon.exe&amp;quot; +4&lt;br /&gt;
                Delete &amp;quot;$AppData\Procyon\version.txt&amp;quot;&lt;br /&gt;
                Call DetectProcyonUpdate&lt;br /&gt;
                Quit&lt;br /&gt;
        Exec &#039;&amp;quot;$AppData\Procyon\procyon.exe&amp;quot;&#039;&lt;br /&gt;
        Quit&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function GetProcyon&lt;br /&gt;
        FileOpen $0 &amp;quot;$AppData\Procyon\version.txt&amp;quot; r&lt;br /&gt;
        FileRead $0 $3&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        StrCpy $3 $3 -2&lt;br /&gt;
        StrCpy $2 &amp;quot;$AppData\Procyon\procyon.exe&amp;quot;&lt;br /&gt;
        Rename $2 &amp;quot;$AppData\Procyon\procyonold.exe&amp;quot;&lt;br /&gt;
        nsisdl::download /TIMEOUT=30000 &amp;quot;${PRODUCT_WEB_SITE}updater/procyon-$3.zip&amp;quot; &amp;quot;$AppData\Procyon\procyon.zip&amp;quot;&lt;br /&gt;
        Pop $R0 ;Get the return value&lt;br /&gt;
                StrCmp $R0 &amp;quot;success&amp;quot; +4&lt;br /&gt;
                MessageBox MB_OK &amp;quot;Download failed: $R0 - $3.zip&amp;quot;&lt;br /&gt;
                Rename &amp;quot;$AppData\Procyon\procyonold.exe&amp;quot; $2&lt;br /&gt;
                Quit&lt;br /&gt;
        nsisunz::UnzipToLog &amp;quot;$AppData\Procyon\procyon.zip&amp;quot; &amp;quot;$AppData\Procyon&amp;quot;&lt;br /&gt;
        Delete &amp;quot;$AppData\Procyon\procyon.zip&amp;quot;&lt;br /&gt;
        Call RunProcyon&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
Function DetectProcyonUpdate&lt;br /&gt;
        StrCpy $2 &amp;quot;$TEMP\procyonupdate.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        nsisdl::download /TIMEOUT=30000 &amp;quot;${PRODUCT_WEB_SITE}updater/procyonupdate.txt&amp;quot; $2&lt;br /&gt;
        Pop $R0 ;Get the return value&lt;br /&gt;
                StrCmp $R0 &amp;quot;success&amp;quot; +3&lt;br /&gt;
                MessageBox MB_OK &amp;quot;Download failed: $R0&amp;quot;&lt;br /&gt;
                Call RunProcyon&lt;br /&gt;
        FileOpen $0 &amp;quot;$TEMP\procyonupdate.txt&amp;quot; r&lt;br /&gt;
        FileRead $0 $1&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        IfFileExists &amp;quot;$AppData\Procyon\*.*&amp;quot; 0 +5&lt;br /&gt;
        FileOpen $0 &amp;quot;$AppData\Procyon\version.txt&amp;quot; r&lt;br /&gt;
        FileRead $0 $3&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        StrCmp $1 $3 +5&lt;br /&gt;
        FileOpen $0 &amp;quot;$AppData\Procyon\version.txt&amp;quot; w&lt;br /&gt;
        FileWrite $0 $1&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        Call GetProcyon&lt;br /&gt;
        Call RunProcyon&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
Function RunLauncher    ; Never actually called&lt;br /&gt;
        Exec $EXEPATH&lt;br /&gt;
        Quit&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Function GetLauncher    ; Never actually called&lt;br /&gt;
        nsisdl::download /TIMEOUT=30000 &amp;quot;${PRODUCT_WEB_SITE}procyon.exe&amp;quot; $EXEPATH&lt;br /&gt;
        Pop $R0 ;Get the return value&lt;br /&gt;
                StrCmp $R0 &amp;quot;success&amp;quot; +4&lt;br /&gt;
                MessageBox MB_OK &amp;quot;Download failed: $R0 - $3.exe&amp;quot;&lt;br /&gt;
                Quit&lt;br /&gt;
        Call RunLauncher&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&lt;br /&gt;
Function DetectLauncherUpdate   ; Never actually called&lt;br /&gt;
        StrCpy $2 &amp;quot;$TEMP\launcherupdate.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        nsisdl::download /TIMEOUT=30000 &amp;quot;${PRODUCT_WEB_SITE}updater/launcherupdate.txt&amp;quot; $2&lt;br /&gt;
        Pop $R0 ;Get the return value&lt;br /&gt;
                StrCmp $R0 &amp;quot;success&amp;quot; +3&lt;br /&gt;
                MessageBox MB_OK &amp;quot;Download failed: $R0&amp;quot;&lt;br /&gt;
                Return&lt;br /&gt;
        FileOpen $0 &amp;quot;$TEMP\launcherupdate.txt&amp;quot; r&lt;br /&gt;
        FileRead $0 $1&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        IfFileExists &amp;quot;$AppData\Procyon\*.*&amp;quot; 0 +5&lt;br /&gt;
        FileOpen $0 &amp;quot;$AppData\Procyon\launcher.txt&amp;quot; r&lt;br /&gt;
        FileRead $0 $3&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        StrCmp $1 $3 +5&lt;br /&gt;
        FileOpen $0 &amp;quot;$AppData\Procyon\launcher.txt&amp;quot; w&lt;br /&gt;
        FileWrite $0 $1&lt;br /&gt;
        FileClose $0&lt;br /&gt;
        Call GetLauncher&lt;br /&gt;
        Call RunLauncher&lt;br /&gt;
FunctionEnd&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
{{PageAuthor|Kazinsal}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Real_World_Installers]]&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=%22Orange_Vista%22_Modern_UI_Theme&amp;diff=12408</id>
		<title>&quot;Orange Vista&quot; Modern UI Theme</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=%22Orange_Vista%22_Modern_UI_Theme&amp;diff=12408"/>
		<updated>2007-05-15T21:52:33Z</updated>

		<summary type="html">&lt;p&gt;Dsuess: added link for download&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;http://www.monki.es/images/stories/orange/image1.jpg&amp;lt;/center&amp;gt; &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Descripton ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Orange Vista Modern UI Theme&amp;quot; is a professional collection of icons and bitmaps with a Windows Vista style for NullSoft Scriptable Install System (NSIS) and his Modern UI.&lt;br /&gt;
&lt;br /&gt;
It has 9 styles, each one with his own installer/uninstaller icon, headers and welcome bitmaps.&lt;br /&gt;
&lt;br /&gt;
The icons have the new 256x256 icon format and adapts perfectly with the look and feel of Windows Vista.&lt;br /&gt;
&lt;br /&gt;
The theme is an evolution of my old [[&amp;quot;Orange&amp;quot; Modern UI Theme]].&lt;br /&gt;
&lt;br /&gt;
== Donwload ==&lt;br /&gt;
&lt;br /&gt;
You can get more info, see more screenshots and download it from here: [http://www.monki.es/blog/diseno/nsis-orange-vista-theme.html http://www.monki.es]&lt;br /&gt;
&lt;br /&gt;
Or download the 7z file directly here:&lt;br /&gt;
[http://www.monki.es/descargas/nsis/orange_vista/MUIOrangeVistaTheme.7z MUIOrangeVistaTheme.7z]&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://www.monki.es/images/stories/orange/image3.jpg&lt;br /&gt;
http://www.monki.es/images/stories/orange/image4.jpg&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
http://www.monki.es/images/stories/orange/image2.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Graphics and UIs]]&lt;/div&gt;</summary>
		<author><name>Dsuess</name></author>
	</entry>
</feed>