2
我一直在使用INI文件添加的自定义页面NSIS安装,这里是一个代码NSIS:访问自定义页面组合框的值?
.
.
.
; Welcome page
!insertmacro MUI_PAGE_WELCOME
Page custom customPage "" ": custom page"
.
.
.
Function customPage
GetTempFileName $R0
File /oname=$R0 customPage.ini
InstallOptions::dialog $R0
Pop $R1
StrCmp $R1 "cancel" done
StrCmp $R1 "back" done
StrCmp $R1 "success" done
error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1"
done:
FunctionEnd
.
.
.
下面是一个customPage.ini文件
; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=2
[Field 1]
Type=Label
Text=Select Version:
Left=4
Right=53
Top=16
Bottom=26
[Field 2]
Type=Combobox
Text=Combobox
ListItems=
Left=53
Right=138
Top=14
Bottom=107
我想设置组合框的值使用动态脚本NSIS ,如何在nsis中访问组合框?
就像Aaron说的,使用GetTempFileName很愚蠢,$ pluginsdir是最好的放置它的地方,因为它会自动删除你 – Anders 2010-05-05 19:41:01
这是太棒了!但有一点意见,要改变ListItems中的选项,你需要在你的代码片段中将“State”改为“ListItems” – 2015-11-13 13:03:39