]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/win64_installer/ConfigPage2.nsh
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / win32 / win64_installer / ConfigPage2.nsh
1 Function EnterConfigPage2
2   IntOp $R0 $NewComponents & ${ComponentsRequiringUserConfig}
3
4   ${If} $R0 = 0
5     Abort
6   ${EndIf}
7
8   FileOpen $R5 "$PLUGINSDIR\ConfigPage2.ini" w
9
10   StrCpy $R6 1  ; Field Number
11   StrCpy $R7 0  ; Top
12
13   IntOp $R0 $NewComponents & ${ComponentDirector}
14   ${If} $R0 <> 0
15     ${If} $AutomaticInstall = 1
16       IntOp $R8 $R7 + 54
17     ${Else}
18       IntOp $R8 $R7 + 92
19     ${EndIf}
20     FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Director"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
21   ${Else}
22     IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
23     ${If} $R0 <> 0
24       IntOp $R8 $R7 + 54
25     ${Else}
26       IntOp $R8 $R7 + 26
27     ${EndIf}
28     FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Enter Director Information"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
29   ${EndIf}
30
31   IntOp $R6 $R6 + 1
32   IntOp $R7 $R7 + 12
33
34   IntOp $R0 $NewComponents & ${ComponentDirector}
35   ${If} $R0 <> 0
36     ${If} "$ConfigDirectorName" == ""
37       StrCpy $ConfigDirectorName "$HostName-dir"
38     ${EndIf}
39     ${If} "$ConfigDirectorPassword" == ""
40       StrCpy $ConfigDirectorPassword "$LocalDirectorPassword"
41     ${EndIf}
42   ${Else}
43     ${If} "$ConfigDirectorName" == "$HostName-dir"
44       StrCpy $ConfigDirectorName ""
45     ${EndIf}
46     ${If} "$ConfigDirectorPassword" == "$LocalDirectorPassword"
47       StrCpy $ConfigDirectorPassword ""
48     ${EndIf}
49   ${EndIf}
50
51   IntOp $R0 $NewComponents & ${ComponentDirector}
52   ${If} $R0 = 0
53   ${OrIf} $AutomaticInstall = 0
54     IntOp $R8 $R7 + 8
55     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="DIR Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=60$\r$\nBottom=$R8$\r$\n$\r$\n'
56     IntOp $R6 $R6 + 1
57     IntOp $R7 $R7 - 2
58
59     IntOp $R8 $R8 + 2
60     FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorName$\r$\nLeft=60$\r$\nTop=$R7$\r$\nRight=158$\r$\nBottom=$R8$\r$\n$\r$\n'
61     IntOp $R6 $R6 + 1
62
63     ${If} $AutomaticInstall = 0
64       IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
65       ${If} $R0 <> 0
66         IntOp $R7 $R7 + 2
67         IntOp $R8 $R8 - 2
68         FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="DIR Port"$\r$\nLeft=172$\r$\nTop=$R7$\r$\nRight=188$\r$\nBottom=$R8$\r$\n$\r$\n'
69         IntOp $R6 $R6 + 1
70         IntOp $R7 $R7 - 2
71
72         IntOp $R8 $R8 + 2
73         FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorPort$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=218$\r$\nBottom=$R8$\r$\n$\r$\n'
74         IntOp $R6 $R6 + 1
75       ${EndIf}
76
77       IntOp $R0 $NewComponents & ${ComponentDirector}
78       ${If} $R0 <> 0
79         IntOp $R7 $R7 + 2
80         IntOp $R8 $R8 - 2
81         FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Max Jobs"$\r$\nLeft=238$\r$\nTop=$R7$\r$\nRight=270$\r$\nBottom=$R8$\r$\n$\r$\n'
82         IntOp $R6 $R6 + 1
83         IntOp $R7 $R7 - 2
84
85         IntOp $R8 $R8 + 2
86         FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nFlags="ONLY_NUMBERS"$\r$\nState=$ConfigDirectorMaxJobs$\r$\nLeft=274$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
87         IntOp $R6 $R6 + 1
88       ${EndIf}
89     ${EndIf}
90
91     IntOp $R7 $R7 + 14
92   ${EndIf}
93
94   IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
95   ${If} $R0 <> 0
96   ${OrIf} $AutomaticInstall = 0
97     IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
98     ${If} $R0 <> 0
99       IntOp $R7 $R7 + 2
100       IntOp $R8 $R7 + 8
101
102       FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="DIR Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=60$\r$\nBottom=$R8$\r$\n$\r$\n'
103
104       IntOp $R6 $R6 + 1
105       IntOp $R7 $R7 - 2
106       IntOp $R8 $R8 + 2
107
108       FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorPassword$\r$\nLeft=60$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
109
110       IntOp $R6 $R6 + 1
111       IntOp $R7 $R7 + 14
112     ${EndIf}
113   ${EndIf}
114
115   IntOp $R0 $NewComponents & ${ComponentDirector}
116   ${If} $R0 <> 0
117     IntOp $R7 $R7 + 2
118     IntOp $R8 $R7 + 8
119
120     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Server"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'
121
122     IntOp $R6 $R6 + 1
123     IntOp $R7 $R7 - 2
124     IntOp $R8 $R8 + 2
125
126     FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailServer$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
127     IntOp $R6 $R6 + 1
128     IntOp $R7 $R7 + 16
129     IntOp $R8 $R7 + 8
130
131     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Mail Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=48$\r$\nBottom=$R8$\r$\n$\r$\n'
132
133     IntOp $R6 $R6 + 1
134     IntOp $R7 $R7 - 2
135     IntOp $R8 $R8 + 2
136
137     FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorMailAddress$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
138     IntOp $R6 $R6 + 1
139     IntOp $R7 $R7 + 16
140     IntOp $R8 $R7 + 8
141
142     FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Database"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
143
144     IntOp $R6 $R6 + 1
145     IntOp $R7 $R7 - 2
146     IntOp $R8 $R8 + 2
147
148     ${If} $ConfigDirectorDB = 0
149       ${If} $MySQLPath != ""
150         StrCpy $ConfigDirectorDB 1
151       ${ElseIf} $PostgreSQLPath != ""
152         StrCpy $ConfigDirectorDB 2
153       ${Else}
154         StrCpy $ConfigDirectorDB 3
155       ${EndIf}
156     ${EndIf}
157
158     ${If} $ConfigDirectorDB = 1
159       StrCpy $R9 1
160     ${Else}
161       StrCpy $R9 0
162     ${EndIf}
163
164     FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="MySQL"$\r$\nFlags="GROUP"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=90$\r$\nBottom=$R8$\r$\n$\r$\n'
165
166     IntOp $R6 $R6 + 1
167
168     ${If} $ConfigDirectorDB = 2
169       StrCpy $R9 1
170     ${Else}
171       StrCpy $R9 0
172     ${EndIf}
173
174     FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="PostgreSQL"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=94$\r$\nTop=$R7$\r$\nRight=146$\r$\nBottom=$R8$\r$\n$\r$\n'
175
176     IntOp $R6 $R6 + 1
177
178     ${If} $ConfigDirectorDB = 3
179       StrCpy $R9 1
180     ${Else}
181       StrCpy $R9 0
182     ${EndIf}
183
184     FileWrite $R5 '[Field $R6]$\r$\nType="RadioButton"$\r$\nState=$R9$\r$\nText="Sqlite"$\r$\nFlags="NOTABSTOP"$\r$\nLeft=150$\r$\nTop=$R7$\r$\nRight=182$\r$\nBottom=$R8$\r$\n$\r$\n'
185
186     IntOp $R6 $R6 + 1
187     IntOp $R7 $R7 + 12
188
189     ${If} $AutomaticInstall = 0
190       IntOp $R8 $R7 + 10
191       FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorInstallService$\r$\nText="Install as service"$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=118$\r$\nBottom=$R8$\r$\n$\r$\n'
192       IntOp $R6 $R6 + 1
193
194       FileWrite $R5 '[Field $R6]$\r$\nType="Checkbox"$\r$\nState=$ConfigDirectorStartService$\r$\nText="Start after install"$\r$\nLeft=190$\r$\nTop=$R7$\r$\nRight=260$\r$\nBottom=$R8$\r$\n$\r$\n'
195
196       IntOp $R6 $R6 + 1
197       IntOp $R7 $R7 + 12
198     ${EndIf}
199   ${Else}
200     IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
201     ${If} $R0 <> 0
202       IntOp $R7 $R7 + 2
203       IntOp $R8 $R7 + 8
204
205       FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="DIR Address"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=60$\r$\nBottom=$R8$\r$\n$\r$\n'
206
207       IntOp $R6 $R6 + 1
208       IntOp $R7 $R7 - 2
209       IntOp $R8 $R8 + 2
210
211       FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigDirectorAddress$\r$\nLeft=60$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
212       IntOp $R6 $R6 + 1
213       IntOp $R7 $R7 + 14
214       IntOp $R8 $R7 + 8
215     ${EndIf}
216   ${EndIf}
217
218   IntOp $R7 $R7 + 4
219
220   ${If} $AutomaticInstall = 0
221     IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}
222     IntOp $R0 0 & 0
223     ${If} $R0 <> 0
224       IntOp $R8 $R7 + 42
225
226       FileWrite $R5 '[Field $R6]$\r$\nType="GroupBox"$\r$\nText="Monitor"$\r$\nLeft=0$\r$\nTop=$R7$\r$\nRight=300$\r$\nBottom=$R8$\r$\n$\r$\n'
227       IntOp $R6 $R6 + 1
228       IntOp $R7 $R7 + 12
229
230       IntOp $R8 $R7 + 8
231       FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Name"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=26$\r$\nBottom=$R8$\r$\n$\r$\n'
232       IntOp $R6 $R6 + 1
233       IntOp $R7 $R7 - 2
234
235       IntOp $R8 $R8 + 2
236       FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorName$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=150$\r$\nBottom=$R8$\r$\n$\r$\n'
237       IntOp $R6 $R6 + 1
238       IntOp $R7 $R7 + 16
239       IntOp $R8 $R7 + 8
240
241       FileWrite $R5 '[Field $R6]$\r$\nType="Label"$\r$\nText="Password"$\r$\nLeft=6$\r$\nTop=$R7$\r$\nRight=38$\r$\nBottom=$R8$\r$\n$\r$\n'
242
243       IntOp $R6 $R6 + 1
244       IntOp $R7 $R7 - 2
245       IntOp $R8 $R8 + 2
246
247       FileWrite $R5 '[Field $R6]$\r$\nType="Text"$\r$\nState=$ConfigMonitorPassword$\r$\nLeft=50$\r$\nTop=$R7$\r$\nRight=294$\r$\nBottom=$R8$\r$\n$\r$\n'
248
249       IntOp $R6 $R6 + 1
250       IntOp $R7 $R7 + 20
251     ${EndIf}
252   ${EndIf}
253
254   IntOp $R6 $R6 - 1
255   FileWrite $R5 "[Settings]$\r$\nNumFields=$R6$\r$\n"
256
257   FileClose $R5
258
259   IntOp $R0 $NewComponents & ${ComponentsFileAndStorage}
260   ${If} $R0 = 0
261   ${OrIf} $AutomaticInstall = 1
262     !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage1)" "$(SUBTITLE_ConfigPage1)"
263   ${Else}
264     !insertmacro MUI_HEADER_TEXT "$(TITLE_ConfigPage2)" "$(SUBTITLE_ConfigPage2)"
265   ${EndIf}
266
267   !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ConfigPage2.ini"
268   Pop $HDLG ;HWND of dialog
269
270   ; Initialize Controls
271   StrCpy $R6 2  ; Field Number
272
273   IntOp $R0 $NewComponents & ${ComponentDirector}
274   ${If} $R0 = 0
275   ${OrIf} $AutomaticInstall = 0
276     ; Name
277     IntOp $R6 $R6 + 1
278     !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
279     SendMessage $HCTL ${EM_LIMITTEXT} 30 0
280     IntOp $R6 $R6 + 1
281
282     ${If} $AutomaticInstall = 0
283       IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
284       ${If} $R0 <> 0
285         IntOp $R6 $R6 + 1
286         ; Port Number
287         !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
288         SendMessage $HCTL ${EM_LIMITTEXT} 5 0
289         IntOp $R6 $R6 + 1
290       ${EndIf}
291
292       IntOp $R0 $NewComponents & ${ComponentDirector}
293       ${If} $R0 <> 0
294         IntOp $R6 $R6 + 1
295         ; Max Jobs
296         !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
297         SendMessage $HCTL ${EM_LIMITTEXT} 3 0
298
299         IntOp $R6 $R6 + 1
300       ${EndIf}
301     ${EndIf}
302   ${EndIf}
303
304   IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
305   ${If} $R0 <> 0
306   ${OrIf} $AutomaticInstall = 0
307     IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
308     ${If} $R0 <> 0
309       IntOp $R6 $R6 + 2
310     ${EndIf}
311   ${EndIf}
312
313   IntOp $R0 $NewComponents & ${ComponentDirector}
314   ${If} $R0 <> 0
315     IntOp $R6 $R6 + 9
316
317     ${If} $AutomaticInstall = 0
318       IntOp $R6 $R6 + 2
319     ${EndIf}
320   ${Else}
321     IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
322     ${If} $R0 <> 0
323       IntOp $R6 $R6 + 2
324     ${EndIf}
325   ${EndIf}
326
327   ${If} $AutomaticInstall = 0
328     IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}
329     ${If} $R0 <> 0
330       IntOp $R6 $R6 + 2
331       !insertmacro MUI_INSTALLOPTIONS_READ $HCTL "ConfigPage2.ini" "Field $R6" "HWND"
332       SendMessage $HCTL ${EM_LIMITTEXT} 30 0
333       IntOp $R6 $R6 + 2
334     ${EndIf}
335   ${EndIf}
336
337   !insertmacro MUI_INSTALLOPTIONS_SHOW
338
339   ; Process results
340
341   StrCpy $R6 2
342
343   IntOp $R0 $NewComponents & ${ComponentDirector}
344   ${If} $R0 = 0
345   ${OrIf} $AutomaticInstall = 0
346     IntOp $R6 $R6 + 1
347     !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorName "ConfigPage2.ini" "Field $R6" "State"
348     IntOp $R6 $R6 + 1
349
350     ${If} $AutomaticInstall = 0
351       IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
352       ${If} $R0 <> 0
353         IntOp $R6 $R6 + 1
354         !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPort "ConfigPage2.ini" "Field $R6" "State"
355         IntOp $R6 $R6 + 1
356       ${EndIf}
357
358       IntOp $R0 $NewComponents & ${ComponentDirector}
359       ${If} $R0 <> 0
360         IntOp $R6 $R6 + 1
361         !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMaxJobs "ConfigPage2.ini" "Field $R6" "State"
362         IntOp $R6 $R6 + 1
363       ${EndIf}
364     ${EndIf}
365   ${EndIf}
366
367   IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
368   ${If} $R0 <> 0
369   ${OrIf} $AutomaticInstall = 0
370     IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
371     ${If} $R0 <> 0
372       IntOp $R6 $R6 + 1
373       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorPassword "ConfigPage2.ini" "Field $R6" "State"
374       IntOp $R6 $R6 + 1
375     ${EndIf}
376   ${EndIf}
377
378   IntOp $R0 $NewComponents & ${ComponentDirector}
379   ${If} $R0 <> 0
380     IntOp $R6 $R6 + 1
381     !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailServer "ConfigPage2.ini" "Field $R6" "State"
382     IntOp $R6 $R6 + 2
383     !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorMailAddress "ConfigPage2.ini" "Field $R6" "State"
384     IntOp $R6 $R6 + 2
385     !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
386     ${If} $R5 = 1
387       StrCpy $ConfigDirectorDB 1
388     ${Endif}
389     IntOp $R6 $R6 + 1
390     !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
391     ${If} $R5 = 1
392       StrCpy $ConfigDirectorDB 2
393     ${Endif}
394     IntOp $R6 $R6 + 1
395     !insertmacro MUI_INSTALLOPTIONS_READ $R5 "ConfigPage2.ini" "Field $R6" "State"
396     ${If} $R5 = 1
397       StrCpy $ConfigDirectorDB 3
398     ${Endif}
399     IntOp $R6 $R6 + 1
400
401     ${If} $AutomaticInstall = 0
402       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorInstallService "ConfigPage2.ini" "Field $R6" "State"
403       IntOp $R6 $R6 + 1
404       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorStartService "ConfigPage2.ini" "Field $R6" "State"
405       IntOp $R6 $R6 + 1
406     ${EndIf}
407   ${Else}
408     IntOp $R0 $NewComponents & ${ComponentsTextAndGuiConsoles}
409     ${If} $R0 <> 0
410       IntOp $R6 $R6 + 1
411       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigDirectorAddress "ConfigPage2.ini" "Field $R6" "State"
412       IntOp $R6 $R6 + 1
413     ${EndIf}
414   ${EndIf}
415
416   ${If} $AutomaticInstall = 0
417     IntOp $R0 $NewComponents & ${ComponentsFileAndStorageAndDirector}
418     ${If} $R0 <> 0
419       IntOp $R6 $R6 + 2
420       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorName "ConfigPage2.ini" "Field $R6" "State"
421       IntOp $R6 $R6 + 2
422       !insertmacro MUI_INSTALLOPTIONS_READ $ConfigMonitorPassword "ConfigPage2.ini" "Field $R6" "State"
423     ${EndIf}
424   ${EndIf}
425 FunctionEnd
426
427 Function LeaveConfigPage2
428   ${If} $AutomaticInstall = 0
429     StrCpy $R6 4
430
431     IntOp $R0 $NewComponents & ${ComponentsDirectorAndTextGuiConsoles}
432     ${If} $R0 <> 0
433       IntOp $R6 $R6 + 1
434       !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"
435       ${If} $R0 < 1024
436       ${OrIf} $R0 > 65535
437         MessageBox MB_OK "Port must be between 1024 and 65535 inclusive."
438         Abort
439       ${EndIf}
440       IntOp $R6 $R6 + 1
441     ${EndIf}
442
443     IntOp $R0 $NewComponents & ${ComponentDirector}
444     ${If} $R0 <> 0
445       IntOp $R6 $R6 + 1
446       !insertmacro MUI_INSTALLOPTIONS_READ $R0 "ConfigPage2.ini" "Field $R6" "State"
447       ${If} $R0 < 1
448       ${OrIf} $R0 > 99
449         MessageBox MB_OK "Max Jobs must be between 1 and 99 inclusive."
450         Abort
451       ${EndIf}
452       IntOp $R6 $R6 + 1
453     ${EndIf}
454   ${EndIf}
455 FunctionEnd