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