NSIS——for循环的使用方法
!include 'LogicLib.nsh' OutFile 'Test_Loop.exe' Section Main 01 ${ForEach} $R0 0 100 + 5 MessageBox MB_OK $R0 ${Next} ${For} $R1 0 10 MessageBox MB_OK $R1 ${Next} SectionEnd
宏使用方法(!macro和!insertmacro)
【案例一】 OutFile 'test_maroc.exe' !macro add a b c ;一个实现(a+b)*(a-b)的宏 IntOp $R0 ${a} - ${b} IntOp $R1 ${a} + ${b} IntOp ${c} $R0 * $R1 !macroend /* 注意:!macro和!insertmacr...
IF与WHILE的使用
逻辑语句的宏文件: !include logiclib.nsh IF语句: ${If} $0 == 'some value' MessageBox MB_OK '$0 is some value' ${ElseIf} $0 == 'some other value' MessageBox MB_OK '$0 is some...
判断NSIS变量是否为空
!include logiclib.nsh Var tmpInst ReadRegStr $0 HKLM ${PRODUCT_INST_KEY} 'InstallDir' MessageBox MB_OK 'tmpInst 有没有值: $0' ${If} $0 == '' MessageBox MB_OK '没值' ${Else} Message...
NSIS 注册表中键值是否存在
;定义注册表主键 !define HKEY_CLASSES_ROOT 0x80000000 !define HKEY_CURRENT_USER 0x80000001 !define HKEY_LOCAL_MACHINE 0x80000002 !define HKEY_USERS 0x80000003 OutFile OpenReg.exe XP...
NSIS循环遍历INI文件内容
INI文件格式如: [Logon] 0CmdLine=hello.exe 0Parameters=123 1CmdLine=hello.exe 1Parameters=123 NSIS代码: !include 'LogicLib.nsh' Function UpdateScriptIni strcpy $Var_IniFile '$INST...
nsis安装包(七)_示例脚本语法解析
以下是代码及解析,其中有底色的部分为脚本内容。 注释、!define、变量、!include、常量 ; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define ...
nsis安装包(四)_软件环境
软件环境 制作nsis安装包,至少需要一个编译程序,它将nsis脚本转化为安装包。 使用有语法高亮、代码折叠、大纲视图等特征的开发环境编辑和编译NSIS脚本是一个方便的方法。 增加了新特征(如文...
nsis安装包(三)_NSIS简介
Nullsoft Install System Nullsoft 脚本安装系统(英语:Nullsoft Scriptable Install System,缩写:NSIS)为一个开放源代码脚本驱动的封装安装工具。可以用其脚本语言自定义安装的流程,同时...
nsis安装包(二)_安装包基础
安装包基础 软件(英语:Software)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为编程语言、系统软件、应用软件和介于这两者之间的中介软件。其中系统软件为计算机...