Reference/InstTypeSetText: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=InstTypeSetText= inst_type_idx text Sets the Text of the specified InstType. If the Text is empty than the InstType is removed. ...")
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  inst_type_idx text
  inst_type_idx text


Sets the Text of the specified [[Reference/InstType|InstType]]. If the Text is empty than the [[Reference/InstType|InstType]] is removed. By using a previously unused inst_type_idx number you can create new [[Reference/InstType|InstType]]. To add/remove [[Reference/Sections|Sections]] to this new [[Reference/InstType|InstType]] see [[Reference/SectionSetInstTypes|SectionSetInstTypes]]. Unlike [[Reference/SectionIn|SectionIn]] the index is zero based, which means the first install type's index is 0.
Sets the Text of the specified [[Reference/InstType|InstType]]. If the Text is empty than the [[Reference/InstType|InstType]] is removed. By using a previously unused inst_type_idx number you can create new [[Reference/InstType|InstType]]. To add/remove [[Reference/Sections|Section]] to this new [[Reference/InstType|InstType]] see [[Reference/SectionSetInstTypes|SectionSetInstTypes]]. Unlike [[Reference/SectionIn|SectionIn]] the index is zero based, which means the first install type's index is 0.


<highlight-nsis>InstType a
<highlight-nsis>InstType a
Line 14: Line 14:
   InstTypeSetText 1 $TEMP
   InstTypeSetText 1 $TEMP
FunctionEnd</highlight-nsis>
FunctionEnd</highlight-nsis>
''Command introduced with NSIS v2.0''

Latest revision as of 11:19, 3 June 2013

InstTypeSetText

inst_type_idx text

Sets the Text of the specified InstType. If the Text is empty than the InstType is removed. By using a previously unused inst_type_idx number you can create new InstType. To add/remove Section to this new InstType see SectionSetInstTypes. Unlike SectionIn the index is zero based, which means the first install type's index is 0.

InstType a
InstType b
 
Function .onInit
  # set first installation type's name to $WINDIR
  InstTypeSetText 0 $WINDIR
  # set second installation type's name to $TEMP
  InstTypeSetText 1 $TEMP
FunctionEnd

Command introduced with NSIS v2.0