forked from jrsoftware/issrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isxfunc.xml
3158 lines (3090 loc) · 195 KB
/
isxfunc.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" standalone="yes" ?>
<isxhelp version="1.0">
<copyright>
Inno Setup
Copyright (C) 1997-2024 Jordan Russell
Portions by Martijn Laan
For conditions of distribution and use, see LICENSE.TXT.
</copyright>
<isxfunc>
<category>
<description>Setup or Uninstall Info</description>
<subcategory>
<function>
<name>GetCmdTail</name>
<prototype>function GetCmdTail: String;</prototype>
<description><p>Returns all command line parameters passed to Setup or Uninstall as a single string, including undocumented internal parameters used by Setup and Uninstall.</p></description>
<seealso><p><link topic="isxfunc_ParamStr">ParamStr</link></p></seealso>
</function>
<function>
<name>ParamCount</name>
<prototype>function ParamCount: Integer;</prototype>
<description><p>Returns the number of command line parameters passed to Setup or Uninstall, excluding undocumented internal parameters used by Setup and Uninstall.</p></description>
<seealso><p><link topic="isxfunc_ParamStr">ParamStr</link><br />
<link topic="isxfunc_GetCmdTail">GetCmdTail</link></p></seealso>
</function>
<function>
<name>ParamStr</name>
<prototype>function ParamStr(Index: Integer): String;</prototype>
<description><p>Returns the Index-th command line parameter passed to Setup or Uninstall, excluding undocumented internal parameters used by Setup and Uninstall.</p>
<p>Parameter number zero is the full file name with which Setup or Uninstall was started.</p>
<p>If Index is invalid, ParamStr returns an empty string.</p></description>
<seealso><p><link topic="isxfunc_ParamCount">ParamCount</link><br />
<link topic="isxfunc_GetCmdTail">GetCmdTail</link></p></seealso>
</function>
</subcategory>
<subcategory>
<function>
<name>ActiveLanguage</name>
<prototype>function ActiveLanguage: String;</prototype>
<description><p>Returns the name of the active language.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>CustomMessage</name>
<prototype>function CustomMessage(const MsgName: String): String;</prototype>
<description><p>Returns the value of the [CustomMessages] entry with the specified name. If an entry with the specified name does not exist, an exception will be raised.</p></description>
<example><pre>var
S: String;
begin
S := CustomMessage('CreateDesktopIcon');
// S = 'Create a &desktop icon'
S := FmtMessage(CustomMessage('NameAndVersion'), ['My Program', '1.0']);
// S = 'My Program version 1.0'
end;</pre></example>
</function>
<function>
<name>FmtMessage</name>
<prototype>function FmtMessage(const S: String; const Args: array of String): String;</prototype>
<description><p>Formats the string S using the specified string arguments. A <tt>%1</tt> in the format string will be replaced with the first value in the Args array; a <tt>%2</tt> will be replaced with the second value; and so on. <tt>%%</tt> will be replaced with <tt>%</tt>.</p></description>
<remarks><p>If a <tt>%</tt>-specifier references a non-existing argument, it will be returned untouched. No exception will be raised.</p></remarks>
<example><pre>var
S: String;
begin
S := FmtMessage('%1 version %2 will be installed.', ['My Program', '1.0']);
// S = 'My Program version 1.0 will be installed.'
S := FmtMessage(SetupMessage(msgNotOnThisPlatform), ['Windows 2000']);
// S = 'This program will not run on Windows 2000.'
end;</pre></example>
</function>
<function>
<name>SetupMessage</name>
<prototype>function SetupMessage(const ID: TSetupMessageID): String;</prototype>
<description><p>Returns the value of the specified message.</p>
<p>TSetupMessageID is defined as:</p>
<p>'msg' + the message name. Example: <i>SetupMessage(msgSetupAppTitle)</i></p></description>
<example><pre>var
S: String;
begin
S := SetupMessage(msgButtonNext);
// S now equals '&Next >'
end;</pre></example>
</function>
</subcategory>
<subcategory>
<function>
<name>WizardDirValue</name>
<prototype>function WizardDirValue: String;</prototype>
<description><p>Returns the current contents of the edit control on the <i>Select Destination Location</i> page of the wizard.</p>
<p>Unlike <tt>ExpandConstant('{app}')</tt>, this function will not fail if called after the wizard is shown but prior to the user selecting a directory. Rather, it will return the default directory name.</p></description>
</function>
<function>
<name>WizardGroupValue</name>
<prototype>function WizardGroupValue: String;</prototype>
<description><p>Returns the current contents of the edit control on the <i>Select Start Menu Folder</i> page of the wizard.</p>
<p>Unlike <tt>ExpandConstant('{group}')</tt>, this function will not fail if called after the wizard is shown but prior to the user selecting a folder. Rather, it will return the default folder name.</p></description>
</function>
<function>
<name>WizardNoIcons</name>
<prototype>function WizardNoIcons: Boolean;</prototype>
<description><p>Returns the current setting of the <i>Don't create a Start Menu folder</i> check box on the <i>Select Start Menu Folder</i> page of the wizard.</p></description>
</function>
<function>
<name>WizardSetupType</name>
<prototype>function WizardSetupType(const Description: Boolean): String;</prototype>
<description><p>Returns the name or description of the setup type selected by the user.</p></description>
</function>
<function>
<name>WizardSelectedComponents</name>
<prototype>function WizardSelectedComponents(const Descriptions: Boolean): String;</prototype>
<description><p>Returns a comma-separated list of names or descriptions of the components selected by the user.</p></description>
<seealso><p><link topic="isxfunc_WizardIsComponentSelected">WizardIsComponentSelected</link><br />
<link topic="isxfunc_WizardSelectComponents">WizardSelectComponents</link></p></seealso>
</function>
<function>
<name>WizardIsComponentSelected</name>
<prototype>function WizardIsComponentSelected(const Components: String): Boolean;</prototype>
<description><p>Returns True if the specified component is selected. Multiple components may be specified in the same manner as in a <link topic="componentstasksparams" window="main">Components parameter</link>.</p></description>
<seealso><p><link topic="isxfunc_WizardSelectedComponents">WizardSelectedComponents</link><br />
<link topic="isxfunc_WizardSelectComponents">WizardSelectComponents</link></p></seealso>
<example><pre>begin
if WizardIsComponentSelected('helpfiles') then
// the 'helpfiles' component is selected
end;</pre></example>
</function>
<function>
<name>WizardSelectComponents</name>
<prototype>procedure WizardSelectComponents(const Components: String);</prototype>
<description><p>Selects the specified comma separated list of component names.</p>
<p>If a component name is prefixed with a "*" character, any child components will be selected as well (except for those that include the <tt>dontinheritcheck</tt> flag). If a component name is prefixed with a "!" character, the component will be deselected.</p>
<p>This function does not change the state of unspecified components. This function can change the state of specified components that include the <tt>fixed</tt> flag.</p>
</description>
<seealso><p><link topic="isxfunc_WizardSelectedComponents">WizardSelectedComponents</link><br />
<link topic="isxfunc_WizardIsComponentSelected">WizardIsComponentSelected</link></p></seealso>
<example><pre>begin
WizardSelectComponents('!helpfiles');
// the 'helpfiles' component is deselected
end;</pre></example>
</function>
<function>
<name>WizardSelectedTasks</name>
<prototype>function WizardSelectedTasks(const Descriptions: Boolean): String;</prototype>
<description><p>Returns a comma-separated list of names or descriptions of the tasks selected by the user.</p></description>
<seealso><p><link topic="isxfunc_WizardIsTaskSelected">WizardIsTaskSelected</link><br />
<link topic="isxfunc_WizardSelectTasks">WizardSelectTasks</link></p></seealso>
</function>
<function>
<name>WizardIsTaskSelected</name>
<prototype>function WizardIsTaskSelected(const Tasks: String): Boolean;</prototype>
<description><p>Returns True if the specified task is selected. Multiple tasks may be specified in the same manner as in a <link topic="componentstasksparams" window="main">Tasks parameter</link>.</p></description>
<seealso><p><link topic="isxfunc_WizardSelectedTasks">WizardSelectedTasks</link><br />
<link topic="isxfunc_WizardSelectTasks">WizardSelectTasks</link></p></seealso>
<example><pre>begin
if WizardIsTaskSelected('desktopicon') then
// the 'desktopicon' task is selected
end;</pre></example>
</function>
<function>
<name>WizardSelectTasks</name>
<prototype>procedure WizardSelectTasks(const Tasks: String);</prototype>
<description><p>Selects the specified comma separated list of task names.</p>
<p>If a task name is prefixed with a "!" character, the task will be deselected.</p>
<p>This function does not change the state of unspecified tasks.</p>
</description>
<seealso><p><link topic="isxfunc_WizardSelectedTasks">WizardSelectedTasks</link><br />
<link topic="isxfunc_WizardIsTaskSelected">WizardIsTaskSelected</link></p></seealso>
<example><pre>begin
WizardSelectTasks('!desktopicon');
// the 'desktopicon' task is deselected
end;</pre></example>
</function>
<function>
<name>WizardSilent</name>
<prototype>function WizardSilent: Boolean;</prototype>
<description><p>Returns True if Setup is running silently, False otherwise.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>IsUninstaller</name>
<prototype>function IsUninstaller: Boolean;</prototype>
<description><p>Returns True if Uninstall is running as opposed to Setup, False otherwise.</p></description>
</function>
<function>
<name>UninstallSilent</name>
<prototype>function UninstallSilent: Boolean;</prototype>
<description><p>Returns True if Uninstall is running silently, False otherwise.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>CurrentFilename</name>
<prototype>function CurrentFilename: String;</prototype>
<description><p>Returns the destination file name of the [Files] entry that is currently being processed. The returned name may include constants.</p>
<p>Do not attempt to call this function from outside a Check, BeforeInstall or AfterInstall event function belonging to a [Files] entry.</p></description>
</function>
<function>
<name>CurrentSourceFilename</name>
<prototype>function CurrentSourceFilename: String;</prototype>
<description><p>Returns the source file name of the [Files] entry that is currently being processed. The returned name may include constants.</p>
<p>Do not attempt to call this function from outside a Check, BeforeInstall or AfterInstall event function belonging to a [Files] entry with the "external" flag.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>ExpandConstant</name>
<prototype>function ExpandConstant(const S: String): String;</prototype>
<description><p>Changes all constants in S to their values. For example, ExpandConstant('{srcexe}') is changed to the filename of Setup.</p>
<p>An exception will be raised if there was an error expanding the constants.</p></description>
</function>
<function>
<name>ExpandConstantEx</name>
<prototype>function ExpandConstantEx(const S: String; const CustomConst, CustomValue: String): String;</prototype>
<description><p>Changes all constants in S to their values. Additionally, any constant equal to CustomConst will be changed to CustomValue.</p>
<p>An exception will be raised if there was an error expanding the constants.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>GetPreviousData</name>
<prototype>function GetPreviousData(const ValueName, DefaultValueData: String): String;</prototype>
<description><p>Gets a value that was previously stored using SetPreviousData.</p></description>
</function>
<function>
<name>SetPreviousData</name>
<prototype>function SetPreviousData(const PreviousDataKey: Integer; const ValueName, ValueData: String): Boolean;</prototype>
<description><p>Sets a value that can be restored later using GetPreviousData. Call SetPreviousData inside a RegisterPreviousData event function, once per setting.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>Terminated</name>
<prototype>function Terminated: Boolean;</prototype>
<description><p>Returns True if Setup or Uninstall is terminating, False otherwise.</p></description>
</function>
<function>
<name>Debugging</name>
<prototype>function Debugging: Boolean;</prototype>
<description><p>Returns True if Setup or Uninstall is being debugged by the Compiler IDE or another application, False otherwise.</p></description>
<seealso><p><link topic="scriptdebug">Run-time debugger</link></p></seealso>
</function>
</subcategory>
<subcategory>
<function>
<name>RegisterExtraCloseApplicationsResource</name>
<prototype>function RegisterExtraCloseApplicationsResource(const DisableFsRedir: Boolean; const AFilename: String): Boolean;</prototype>
<description><p>Register an extra file which Setup should check for being in-use. Call RegisterExtraCloseApplicationsResource inside a RegisterExtraCloseApplicationsResources event function, once per file. Ignores <link topic="setup_closeapplicationsfilter">CloseApplicationsFilter</link>. Returns True if successful.</p></description>
</function>
<function>
<name>RmSessionStarted</name>
<prototype>function RmSessionStarted: Boolean;</prototype>
<description><p>Returns True if a Restart Manager session was started, False otherwise.</p></description>
<seealso><p><link topic="setup_closeapplications">CloseApplications</link></p></seealso>
</function>
</subcategory>
<subcategory>
<function>
<name>GetWizardForm</name>
<prototype>function GetWizardForm: TWizardForm;</prototype>
<description><p>Returns the <tt>WizardForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
<seealso><p><link topic="scriptclasses" anchor="WizardForm">WizardForm</link></p></seealso>
</function>
<function>
<name>GetUninstallProgressForm</name>
<prototype>function GetUninstallProgressForm: TUninstallProgressForm;</prototype>
<description><p>Returns the <tt>UninstallProgressForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
<seealso><p><link topic="scriptclasses" anchor="UninstallProgressForm">UninstallProgressForm</link></p></seealso>
</function>
<function>
<name>GetMainForm</name>
<prototype>function GetMainForm: TMainForm;</prototype>
<description><p>Returns the <tt>MainForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
<seealso><p><link topic="scriptclasses" anchor="MainForm">MainForm</link></p></seealso>
</function>
</subcategory>
</category>
<category>
<description>Exception</description>
<subcategory>
<function>
<name>Abort</name>
<prototype>procedure Abort;</prototype>
<description><p>Escapes from the current execution path without reporting an error.</p>
<p>Abort raises a special "silent exception" which operates like any other exception, but does not display an error message to the end user.</p></description>
<remarks><p>Abort does not cause Setup or Uninstall to exit unless it's called from one of these event functions (or another function invoked by them):</p>
<p><tt>InitializeSetup<br />
InitializeWizard<br />
CurStepChanged(ssInstall)</tt></p>
<p><tt>InitializeUninstall<br />
CurUninstallStepChanged(usAppMutexCheck)<br />
CurUninstallStepChanged(usUninstall)</tt></p></remarks>
<seealso><p><link topic="scriptevents" anchor="PrepareToInstall">PrepareToInstall</link></p></seealso>
</function>
<function>
<name>RaiseException</name>
<prototype>procedure RaiseException(const Msg: String);</prototype>
<description><p>Raises an exception with the specified message.</p></description>
<example><pre>begin
RaiseException('Your message goes here');
// The following line will not be executed because of the exception
MsgBox('You will not see this.', mbInformation, MB_OK);
end;</pre></example>
</function>
</subcategory>
<subcategory>
<function>
<name>GetExceptionMessage</name>
<prototype>function GetExceptionMessage: String;</prototype>
<description><p>Returns the message associated with the current exception. This function should only be called from within an <tt>except</tt> section, or a function called from an <tt>except</tt> section.</p></description>
<remarks><p>Exception messages generally do not end in a period. Pass the result of this function to AddPeriod to add one.</p></remarks>
<example><pre>var
I: Integer;
begin
I := 1;
try
// The following line will raise a "Division by zero" exception
I := I div 0;
except
// Catch the exception, deal with it, and continue
MsgBox('We caught this exception: ' + AddPeriod(GetExceptionMessage),
mbError, MB_OK);
end;
end;</pre></example>
</function>
<function>
<name>ShowExceptionMessage</name>
<prototype>procedure ShowExceptionMessage;</prototype>
<description><p>Shows the message associated with the current exception in a message box. This function should only be called from within an <tt>except</tt> section, or a function called from an <tt>except</tt> section.</p></description>
<remarks><p>If logging is enabled (via the <link topic="setupcmdline">/LOG</link> command line parameter or the <link topic="setup_setuplogging">SetupLogging</link> [Setup] section directive or the <link topic="setup_uninstalllogging">UninstallLogging</link> [Setup] section directive or debugging from the Compiler IDE) the message will be recorded in the log file and/or in the Compiler IDE's "Debug Output" view in addition to being shown.</p></remarks>
<example><pre>var
I: Integer;
begin
I := 1;
try
// The following line will raise a "Division by zero" exception
I := I div 0;
except
// Catch the exception, show it, and continue
ShowExceptionMessage;
end;
end;</pre></example>
</function>
</subcategory>
</category>
<category>
<description><p>System</p></description>
<subcategory>
<function>
<name>IsAdmin</name>
<prototype>function IsAdmin: Boolean;</prototype>
<description><p>Returns True if Setup/Uninstall is running with administrative privileges.</p></description>
</function>
<function>
<name>IsAdminInstallMode</name>
<prototype>function IsAdminInstallMode: Boolean;</prototype>
<description><p>Returns True if Setup is running in <link topic="admininstallmode">administrative install mode</link> or if Uninstall is running with administrative privileges.</p></description>
</function>
<function>
<name>GetWindowsVersion</name>
<prototype>function GetWindowsVersion: Cardinal;</prototype>
<description><p>Returns the version number of Windows packed into a single integer. The upper 8 bits specify the major version; the following 8 bits specify the minor version; the lower 16 bits specify the build number. For example, this function will return $0A002800 on Windows 10 Version 1507, which is version 10.0.10240.</p>
<p>To retrieve just the major version number, use: "GetWindowsVersion shr 24". To retrieve just the minor version number, use: "(GetWindowsVersion shr 16) and $FF". To retrieve just the build number, use: "GetWindowsVersion and $FFFF".</p></description>
<example><pre>function IsWindows8OrLater: Boolean;
begin
Result := (GetWindowsVersion >= $06020000);
end;</pre></example>
<seealso><p><link topic="isxfunc_GetWindowsVersionEx">GetWindowsVersionEx</link></p></seealso>
</function>
<function>
<name>GetWindowsVersionEx</name>
<prototype>procedure GetWindowsVersionEx(var Version: TWindowsVersion);</prototype>
<description><p>Returns extended information about the version of Windows in a record.</p>
<p>TWindowsVersion is defined as:</p>
<pre>
TWindowsVersion = record
Major: Cardinal; // Major version number
Minor: Cardinal; // Minor version number
Build: Cardinal; // Build number
ServicePackMajor: Cardinal; // Major version number of service pack
ServicePackMinor: Cardinal; // Minor version number of service pack
NTPlatform: Boolean; // True if an NT-based platform
ProductType: Byte; // Product type (see below)
SuiteMask: Word; // Product suites installed (see below)
end;
</pre>
<p>The ProductType field can be one of the following values:</p>
<pre>
VER_NT_WORKSTATION
VER_NT_DOMAIN_CONTROLLER
VER_NT_SERVER
</pre>
<p>It can also be zero if the product type could not be determined (unlikely). VER_NT_WORKSTATION indicates a non-server edition of Windows (e.g. Workstation, Professional, or Home).</p>
<p>The SuiteMask field can be a combination of the following values:</p>
<pre>
VER_SUITE_BACKOFFICE
VER_SUITE_BLADE
VER_SUITE_DATACENTER
VER_SUITE_ENTERPRISE
VER_SUITE_EMBEDDEDNT
VER_SUITE_PERSONAL
VER_SUITE_SINGLEUSERTS
VER_SUITE_SMALLBUSINESS
VER_SUITE_SMALLBUSINESS_RESTRICTED
VER_SUITE_TERMINAL
</pre>
<p>VER_SUITE_PERSONAL, for example, is set on Home edition of Windows XP, and VER_SUITE_BLADE is set on the Web edition of Windows Server 2003.</p></description>
<example><p>The following example demonstrates how you can disallow installation on certain editions of Windows, and check service pack levels on multiple operating system versions. (Neither of these things are possible with the <tt>MinVersion</tt> [Setup] section directive.)</p>
<pre>function InitializeSetup: Boolean;
var
Version: TWindowsVersion;
S: String;
begin
GetWindowsVersionEx(Version);
// Disallow installation on Home edition of Windows
if Version.SuiteMask and VER_SUITE_PERSONAL <> 0 then
begin
SuppressibleMsgBox('This program cannot be installed on a Home edition of Windows.',
mbCriticalError, MB_OK, IDOK);
Result := False;
Exit;
end;
// Disallow installation on domain controllers
if Version.ProductType = VER_NT_DOMAIN_CONTROLLER then
begin
SuppressibleMsgBox('This program cannot be installed on domain controllers.',
mbCriticalError, MB_OK, IDOK);
Result := False;
Exit;
end;
Result := True;
end;</pre></example>
</function>
<function>
<name>GetWindowsVersionString</name>
<prototype>function GetWindowsVersionString: String;</prototype>
<description><p>Returns the version number of Windows in string form. On Windows 2000, for example, this function will return "5.00.2195".</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>IsWin64</name>
<prototype>function IsWin64: Boolean;</prototype>
<description><p>Returns True if the system is running a 64-bit version of Windows. If False is returned, you cannot utilize any of Inno Setup's 64-bit-only features.</p>
<p>Another way to describe this function is: Returns True if the system matches architecture identifier <link topic="archidentifiers">win64</link>.</p>
<p>Do not use this function to detect <link topic="32vs64bitinstalls">64-bit install mode</link>, use <link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link> instead.</p></description>
<example><pre>begin
// Check IsWin64 before using a 64-bit-only feature to
// avoid an exception when running on 32-bit Windows.
if IsWin64 then
begin
MsgBox('64-bit program files reside in: ' +
ExpandConstant('{autopf64}'), mbInformation, MB_OK);
end;
end;</pre></example>
<seealso><p><link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>Is64BitInstallMode</name>
<prototype>function Is64BitInstallMode: Boolean;</prototype>
<description><p>Returns True if Setup or Uninstall is running in <link topic="32vs64bitinstalls">64-bit install mode</link>, or False if it is running in <link topic="32vs64bitinstalls">32-bit install mode</link>.</p></description>
<remarks><p>When True is returned, it is safe to assume that <link topic="isxfunc_IsWin64">IsWin64</link> will also return True.</p></remarks>
<example><pre>begin
if Is64BitInstallMode then
MsgBox('Installing in 64-bit mode', mbInformation, MB_OK)
else
MsgBox('Installing in 32-bit mode', mbInformation, MB_OK);
end;</pre></example>
<seealso><p><link topic="isxfunc_IsWin64">IsWin64</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>ProcessorArchitecture</name>
<prototype>function ProcessorArchitecture: TSetupProcessorArchitecture;</prototype>
<description><p>Returns the architecture of the system's Windows installation.</p>
<p><tt>TSetupProcessorArchitecture</tt> is an enumerated type, defined as:</p>
<p><tt>TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paArm32, paArm64);</tt></p></description>
<remarks><p><tt>paUnknown</tt> is returned if Setup/Uninstall does not recognize the architecture of the Windows installation. It can be assumed that an "unknown" architecture is at least capable of executing 32-bit x86 code, or Setup/Uninstall wouldn't be running at all.</p>
<p><tt>paArm32</tt> is not a possible return value for this function because no version of Windows for 32-bit Arm processors had the ability to run x86 binaries. (An x86 emulator was first introduced in Arm64 Windows.)</p></remarks>
<example><pre>var
S: String;
begin
case ProcessorArchitecture of
paX86: S := 'x86';
paX64: S := 'x64';
paArm64: S := 'Arm64';
else
S := 'Unrecognized';
end;
MsgBox('Windows architecture: ' + S, mbInformation, MB_OK);
end;</pre></example>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link></p></seealso>
</function>
<function>
<name>IsArm32Compatible</name>
<prototype>function IsArm32Compatible: Boolean;</prototype>
<description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">arm32compatible</link>.</p></description>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>IsArm64</name>
<prototype>function IsArm64: Boolean;</prototype>
<description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">arm64</link>.</p></description>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>IsX64Compatible</name>
<prototype>function IsX64Compatible: Boolean;</prototype>
<description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x64compatible</link>.</p></description>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>IsX64OS</name>
<prototype>function IsX64OS: Boolean;</prototype>
<description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x64os</link>.</p>
<p>Before Inno Setup 6.3, <tt>IsX64OS</tt> was named <tt>IsX64</tt>. The compiler still accepts <tt>IsX64</tt> as an alias for <tt>IsX64OS</tt>, but will emit a deprecation warning when used.</p></description>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>IsX86Compatible</name>
<prototype>function IsX86Compatible: Boolean;</prototype>
<description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x86compatible</link>.</p></description>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
<function>
<name>IsX86OS</name>
<prototype>function IsX86OS: Boolean;</prototype>
<description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x86os</link>.</p>
<p>Before Inno Setup 6.3, <tt>IsX86OS</tt> was named <tt>IsX86</tt>. The compiler still accepts <tt>IsX86</tt> as an alias for <tt>IsX86OS</tt>.</p></description>
<seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
</function>
</subcategory>
<subcategory>
<function>
<name>InstallOnThisVersion</name>
<prototype>function InstallOnThisVersion(const MinVersion, OnlyBelowVersion: String): Boolean;</prototype>
<description><p>This function is deprecated. Returns True if an entry with the specified MinVersion and OnlyBelowVersion parameters should be installed. If an invalid version string is passed, an exception will be raised.</p>
<p>This function is provided for backward compatibility only, and may be removed in a future release. New scripts should use <link topic="isxfunc_GetWindowsVersion">GetWindowsVersion</link> or <link topic="isxfunc_GetWindowsVersionEx">GetWindowsVersionEx</link> instead.</p></description>
<remarks><p>Prior to Inno Setup 5.5.0, this function returned <tt>irInstall</tt> rather than a Boolean True value. <tt>irInstall</tt> is now defined as an alias for True.</p></remarks>
<example><pre>// Old method, deprecated
function IsWindows8OrLater: Boolean;
begin
Result := InstallOnThisVersion('0,6.2', '0,0');
end;
// New method
function IsWindows8OrLater: Boolean;
begin
Result := (GetWindowsVersion >= $06020000);
end;</pre></example>
<seealso><p><link topic="isxfunc_GetWindowsVersion">GetWindowsVersion</link><br />
<link topic="isxfunc_GetWindowsVersionEx">GetWindowsVersionEx</link></p></seealso>
</function>
<function>
<name>IsDotNetInstalled</name>
<prototype>function IsDotNetInstalled(const MinVersion: TDotNetVersion; const MinServicePack: Cardinal): Boolean;</prototype>
<description><p>Returns True if the .NET Framework with the specified MinVersion and MinServicePack parameters is installed.</p>
<p>TDotNetVersion is defined as:</p>
<p><tt>TDotNetVersion = (net11, net20, net30, net35, net4Client, net4Full, net45, net451, net452, net46, net461, net462, net47, net471, net472, net48);</tt></p></description>
<example><pre>function InitializeSetup: Boolean;
begin
Result := IsDotNetInstalled(net462, 0); //Returns True if .NET Framework version 4.6.2 is installed, or a compatible version such as 4.8
if not Result then
SuppressibleMsgBox(FmtMessage(SetupMessage(msgWinVersionTooLowError), ['.NET Framework', '4.6.2']), mbCriticalError, MB_OK, IDOK);
end;</pre></example>
</function>
<function>
<name>IsMsiProductInstalled</name>
<prototype>function IsMsiProductInstalled(const UpgradeCode: String; const PackedMinVersion: Int64): Boolean;</prototype>
<description><p>Returns True if a MSI product with the specified UpgradeCode and PackedMinVersion is installed.</p>
<p>If there are multiple products installed with the specified UpgradeCode only the version of the first product returned by the system is checked.</p>
<p>An exception will be raised if an error occurs.</p></description>
<example><pre>function InitializeSetup: Boolean;
begin
Result := IsMsiProductInstalled('{20400CF0-DE7C-327E-9AE4-F0F38D9085F8}', PackVersionComponents(12, 0, 0, 0)); //Returns True if Visual C++ 2013 Redistributable (x64) is installed
if not Result then
SuppressibleMsgBox(FmtMessage(SetupMessage(msgWinVersionTooLowError), ['Visual C++ 2013 Redistributable (x64)', '12.0']), mbCriticalError, MB_OK, IDOK);
end;</pre></example>
</function>
</subcategory>
<subcategory>
<function>
<name>GetEnv</name>
<prototype>function GetEnv(const EnvVar: String): String;</prototype>
<description><p>Gets the value of the specified environment variable.</p></description>
</function>
<function>
<name>GetUserNameString</name>
<prototype>function GetUserNameString: String;</prototype>
<description><p>Retrieves the name of the user currently logged onto the system.</p></description>
</function>
<function>
<name>GetComputerNameString</name>
<prototype>function GetComputerNameString: String;</prototype>
<description><p>Retrieves the name of the computer the Setup or Uninstall program is running on (as returned by the Windows <i>GetComputerName</i> function).</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>GetUILanguage</name>
<prototype>function GetUILanguage: Integer;</prototype>
<description><p>Returns the language identifier (LANGID) of the current user's UI language, which is either the language of Windows itself, or in the case of a MUI edition of Windows, the user interface language chosen in Control Panel's Regional Options. Returns 0 if the function fails (unlikely).</p></description>
<remarks><p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/dd318693.aspx">list of valid language identifiers on MSDN</a>.</p></remarks>
<example><pre>begin
if GetUILanguage = $0409 then
begin
// UI language is English (United States)
end;
// You can use "and $3FF" to extract the primary language identifier
if GetUILanguage and $3FF = $09 then
begin
// Matches any variant of English
end;
end;</pre></example>
</function>
</subcategory>
<subcategory>
<function>
<name>FontExists</name>
<prototype>function FontExists(const FaceName: String): Boolean;</prototype>
<description><p>Returns True if a font with the specified face name is installed on the system.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>FindWindowByClassName</name>
<prototype>function FindWindowByClassName(const ClassName: String): HWND;</prototype>
<description><p>Retrieves a handle to the top-level window whose class name matches the specified string. This function does not search child windows, and does not perform a case-sensitive search. Returns 0 if no window is found.</p></description>
</function>
<function>
<name>FindWindowByWindowName</name>
<prototype>function FindWindowByWindowName(const WindowName: String): HWND;</prototype>
<description><p>Retrieves a handle to the top-level window whose window name matches the specified string. This function does not search child windows, and does not perform a case-sensitive search. Returns 0 if no window is found.</p></description>
</function>
<function>
<name>SendMessage</name>
<prototype>function SendMessage(const Wnd: HWND; const Msg, WParam, LParam: LongInt): LongInt;</prototype>
<description><p>Sends the specified message to the specified window. Does not return until the window procedure has processed the message.</p></description>
</function>
<function>
<name>PostMessage</name>
<prototype>function PostMessage(const Wnd: HWND; const Msg, WParam, LParam: LongInt): Boolean;</prototype>
<description><p>Posts the specified message to the specified window, returning immediately. Returns True if successful.</p></description>
</function>
<function>
<name>SendNotifyMessage</name>
<prototype>function SendNotifyMessage(const Wnd: HWND; const Msg, WParam, LParam: LongInt): Boolean;</prototype>
<description><p>Sends the specified message to the specified window without waiting for the message to be processed by the destination window procedure. Returns True if successful.</p></description>
</function>
<function>
<name>RegisterWindowMessage</name>
<prototype>function RegisterWindowMessage(const Name: String): LongInt;</prototype>
<description><p>The RegisterWindowMessage function defines a new window message that is guaranteed to be unique throughout the system. The returned message value can be used when calling the SendBroadcastMessage or PostBroadcastMessage function.</p></description>
</function>
<function>
<name>SendBroadcastMessage</name>
<prototype>function SendBroadcastMessage(const Msg, WParam, LParam: LongInt): LongInt;</prototype>
<description><p>Sends the specified message to top-level windows in the system. Does not return until all window procedure have processed the message.<br />The specified message must be unique. Use RegisterWindowMessage to get such a message.</p></description>
</function>
<function>
<name>PostBroadcastMessage</name>
<prototype>function PostBroadcastMessage(const Msg, WParam, LParam: LongInt): Boolean;</prototype>
<description><p>Posts the specified message to top-level windows in the system, returning immediately.<br />The specified message must be unique. Use RegisterWindowMessage to get such a message.</p></description>
</function>
<function>
<name>SendBroadcastNotifyMessage</name>
<prototype>function SendBroadcastNotifyMessage(const Msg, WParam, LParam: LongInt): Boolean;</prototype>
</function>
</subcategory>
<subcategory>
<function>
<name>CreateMutex</name>
<prototype>procedure CreateMutex(const Name: String);</prototype>
<description><p>Creates a mutex with the specified name.</p></description>
</function>
<function>
<name>CheckForMutexes</name>
<prototype>function CheckForMutexes(Mutexes: String): Boolean;</prototype>
<description><p>Returns True if any of the mutexes in the comma-separated Mutexes string exist.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>MakePendingFileRenameOperationsChecksum</name>
<prototype>procedure MakePendingFileRenameOperationsChecksum: String;</prototype>
<description><p>Calculates a checksum of the current PendingFileRenameOperations registry value. The caller can use this checksum to determine if PendingFileRenameOperations or WININIT.INI was changed (perhaps by another program).</p></description>
<example><pre>var
ChecksumBefore, ChecksumAfter: String;
begin
ChecksumBefore := MakePendingFileRenameOperationsChecksum;
// ...run a program...
ChecksumAfter := MakePendingFileRenameOperationsChecksum;
if ChecksumAfter <> ChecksumBefore then
// PendingFileRenameOperations or WININIT.INI changed
end;</pre></example>
</function>
</subcategory>
<subcategory>
<function>
<name>CreateCallback</name>
<prototype>function CreateCallback(Method: AnyMethod): Longword;</prototype>
<description><p>Allows you to perform direct callbacks from DLL functions (like Windows API functions) to functions in your script.</p></description>
<example><pre>function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: Longword): Longword;
external '[email protected] stdcall';
var
TimerCount: Integer;
procedure MyTimerProc(Arg1, Arg2, Arg3, Arg4: Longword);
begin
Inc(TimerCount);
WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount);
WizardForm.BeveledLabel.Visible := True;
end;
procedure InitializeWizard;
begin
SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc));
end;</pre></example>
</function>
<function>
<name>UnloadDLL</name>
<prototype>procedure UnloadDLL(Filename: String);</prototype>
<description><p>Unloads the specified DLL that was loaded by the [Code] section using an "external" keyword. This can be useful if you need to delete the DLL.</p>
<p>The case of the filename and any path name must exactly match that of the function import. You will need to expand any constants in the filename yourself before passing it to UnloadDLL.</p>
<p>If the function import used a "files:" prefix, prepend the value of the <tt>{tmp}</tt> constant to the filename (e.g. <tt>ExpandConstant('{tmp}\filename.dll')</tt>).</p></description>
<remarks><p>It's not recommended that you try this, but if you attempt to call a function in a DLL that has been unloaded, the DLL will be re-loaded.</p></remarks>
<example><pre>procedure DllFunc; external 'DllFunc@{app}\MyDll.dll stdcall uninstallonly';
...
begin
// Call DllFunc
DllFunc;
// Unload the DLL
UnloadDLL(ExpandConstant('{app}\MyDll.dll'));
// Now we can delete the DLL
DeleteFile(ExpandConstant('{app}\MyDll.dll'));
end;</pre></example>
</function>
<function>
<name>DLLGetLastError</name>
<prototype>function DLLGetLastError(): LongInt;</prototype>
<description><p>Returns value the last error code had right after the most recent DLL function call you made. Useful after calling Windows API functions (if the function sets the last error code).</p></description>
<remarks><p>It's recommended to use this function instead of directly calling the GetLastError Windows API function since Setup or Uninstall makes API calls of its own, so the last error code could be overwritten at any time.</p>
<p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx">system error codes on MSDN</a>.</p></remarks>
<example><pre>function MessageBox(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal): Integer; external '[email protected] stdcall';
...
begin
if MessageBox(-1, '', '', -1) = 0 then
MsgBox(SysErrorMessage(DLLGetLastError), mbError, mb_Ok);</pre></example>
</function>
</subcategory>
</category>
<category>
<description><p>String</p></description>
<subcategory>
<function>
<name>Chr</name>
<prototype>function Chr(B: Byte): Char;</prototype>
<description><p>Returns the character with the specified ordinal value.</p></description>
</function>
<function>
<name>Ord</name>
<prototype>function Ord(C: Char): Byte;</prototype>
<description><p>Returns the ordinal value of the specified character.</p></description>
</function>
<function>
<name>Copy</name>
<prototype>function Copy(S: AnyString; Index, Count: Integer): String;</prototype>
<description><p>Returns a string containing Count characters starting at S[Index].<br />If Index is larger than the length of S, Copy returns an empty string.<br />If Count specifies more characters than are available, only the characters from S[Index] to the end of S are returned.</p></description>
</function>
<function>
<name>Length</name>
<prototype>function Length(S: AnyString): LongInt;</prototype>
<description><p>Returns the length of the specified string.</p></description>
</function>
<function>
<name>Lowercase</name>
<prototype>function Lowercase(S: AnyString): String;</prototype>
<description><p>Returns a copy of the string S, but with all 7-bit ASCII characters between 'A' and 'Z' converted to lowercase. To convert 8-bit international characters, use AnsiLowercase instead.</p></description>
</function>
<function>
<name>Uppercase</name>
<prototype>function Uppercase(S: AnyString): String;</prototype>
<description><p>Returns a copy of the string S, but with all 7-bit ASCII characters between 'a' and 'z' converted to uppercase. To convert 8-bit international characters, use AnsiUppercase instead.</p></description>
</function>
<function>
<name>AnsiLowercase</name>
<prototype>function AnsiLowercase(S: AnyString): String;</prototype>
<description><p>Returns a string that is a copy of the given string converted to lowercase. The conversion uses the current Windows locale. This function supports multi-byte character sets (MBCS).</p></description>
</function>
<function>
<name>AnsiUppercase</name>
<prototype>function AnsiUppercase(S: AnyString): String;</prototype>
<description><p>Returns a string that is a copy of the given string converted to uppercase. The conversion uses the current Windows locale. This function supports multi-byte character sets (MBCS).</p></description>
</function>
<function>
<name>StringOfChar</name>
<prototype>function StringOfChar(C: Char; I : LongInt): String;</prototype>
<description><p>Returns a string of length I with all characters set to character C.</p></description>
</function>
<function>
<name>Delete</name>
<prototype>procedure Delete(var S: AnyString; Index, Count: Integer);</prototype>
<description><p>Removes a substring of Count characters from string S starting at S[Index].<br />If Index is larger than the length of S, no characters are deleted. If Count specifies more characters than remain starting at the S[Index], Delete removes the rest of the string.</p></description>
</function>
<function>
<name>Insert</name>
<prototype>procedure Insert(Source: AnyString; var Dest: AnyString; Index: Integer);</prototype>
<description><p>Merges Source into Dest at the position Dest[Index].</p></description>
</function>
<function>
<name>StringChange</name>
<prototype>function StringChange(var S: String; const FromStr, ToStr: String): Integer;</prototype>
<description><p>This function is deprecated. It is equivalent to calling <link topic="isxfunc_StringChangeEx">StringChangeEx</link> with the SupportMBCS parameter set to False.</p></description>
</function>
<function>
<name>StringChangeEx</name>
<prototype>function StringChangeEx(var S: String; const FromStr, ToStr: String; const SupportDBCS: Boolean): Integer;</prototype>
<description><p>Changes all occurrences in S of FromStr to ToStr. If SupportDBCS is True (recommended unless you require binary safety), double-byte character sequences in S are recognized and handled properly. Otherwise, the function behaves in a binary-safe manner. Returns the number of times FromStr was matched and changed.</p></description>
<remarks><p>When working with strings containing paths or filenames, be sure to pass True in the SupportDBCS parameter. Otherwise, paths with Chinese, Japanese, or Korean characters may be corrupted.</p></remarks>
<example><pre>var
S: String;
begin
S := ExpandConstant('{commonappdata}');
// S = 'C:\Documents and Settings\All Users\Application Data'
StringChangeEx(S, '\', '/', True);
// S = 'C:/Documents and Settings/All Users/Application Data'
end;</pre></example>
</function>
<function>
<name>Pos</name>
<prototype>function Pos(SubStr, S: AnyString): Integer;</prototype>
<description><p>Searches for Substr within S and returns an integer value that is the index of the first character of Substr within S.<br />If Substr is not found, Pos returns zero. The Pos function is case-sensitive.</p></description>
</function>
<function>
<name>AddQuotes</name>
<prototype>function AddQuotes(const S: String): String;</prototype>
<description><p>Adds a quote (") character to the left and right sides of the string if the string contains a space and it didn't have quotes already. This is primarily used when spawning another process with a long filename as one of the parameters.</p></description>
</function>
<function>
<name>RemoveQuotes</name>
<prototype>function RemoveQuotes(const S: String): String;</prototype>
<description><p>Opposite of AddQuotes; removes any quotes around the string.</p></description>
</function>
<function>
<name>ConvertPercentStr</name>
<prototype>function ConvertPercentStr(var S: String): Boolean;</prototype>
<description><p>Expands all %-encoded characters in the string (see <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>). Returns True if all were successfully expanded.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>CompareText</name>
<prototype>function CompareText(const S1, S2: String): Integer;</prototype>
<description><p>Compares the strings S1 and S2 and returns 0 if they are equal. If S1 is greater than S2, CompareText returns an integer greater than 0. If S1 is less than S2, CompareText returns an integer less than 0. The CompareText function is not case-sensitive.</p></description>
</function>
<function>
<name>CompareStr</name>
<prototype>function CompareStr(const S1, S2: String): Integer;</prototype>
<description><p>Compares S1 to S2, with case-sensitivity. The return value is less than 0 if S1 is less than S2, 0 if S1 equals S2, or greater than 0 if S1 is greater than S2.</p></description>
</function>
<function>
<name>SameText</name>
<prototype>function SameText(const S1, S2: String): Boolean;</prototype>
<description><p>Compares the strings S1 and S2 and returns True if they are equal. The SameText function is not case-sensitive.</p></description>
</function>
<function>
<name>SameStr</name>
<prototype>function SameStr(const S1, S2: String): Boolean;</prototype>
<description><p>Compares S1 to S2, with case-sensitivity. The return value is True if they are equal.</p></description>
</function>
<function>
<name>IsWildcard</name>
<prototype>function IsWildcard(const Pattern: String): Boolean;</prototype>
<description><p>Returns True if the specified pattern contains a wildcard.</p></description>
</function>
<function>
<name>WildcardMatch</name>
<prototype>function WildcardMatch(const Text, Pattern: String): Boolean;</prototype>
<description><p>Returns True if the specified text matches the specified pattern.</p></description>
</function>
</subcategory>
<subcategory>
<function>
<name>Format</name>
<prototype>function Format(const Format: String; const Args: array of const): String;</prototype>
<description><p>Formats the series of arguments in the open array Args. Formatting is controlled by the format string Format; the results are returned as a string.</p>
<p>An exception will be raised if an invalid format string is specified, too few arguments are passed, or if any arguments are of the wrong type.</p></description>
<example><pre>var
S: String;
I: Integer;
begin
S := Format('%d files found', [10]);
// S = '10 files found'
S := Format('Filename: %s', ['file.txt']);
// S = 'Filename: file.txt'
I := 64;
S := Format('%d in hex, padded to 8 digits: %.8x', [I, I]);
// S = '64 in hex, padded to 8 digits: 00000040'
end;</pre></example>
</function>
</subcategory>
<subcategory>
<function>
<name>Trim</name>
<prototype>function Trim(const S: AnyString): AnyString;</prototype>
<description><p>Trims leading and trailing spaces and control characters from the given string S.</p></description>
</function>
<function>
<name>TrimLeft</name>
<prototype>function TrimLeft(const S: String): String;</prototype>
<description><p>Trims leading spaces and control characters from the given string S.</p></description>
</function>
<function>
<name>TrimRight</name>
<prototype>function TrimRight(const S: String): String;</prototype>
<description><p>Trims trailing spaces and control characters from the given string S.</p></description>
</function>
<function>
<name>StringJoin</name>
<prototype>function StringJoin(const Separator: String; const Values: TArrayOfString): String;</prototype>
<description><p>Joins two or more strings together separated by the given separator.</p></description>
<example><pre>var
S: String;
begin
S := StringJoin(',', ['1', '2']);
// S = '1,2'
end;
</pre></example>
<seealso><p><link topic="isxfunc_StringSplit">StringSplit</link></p></seealso>
</function>
<function>
<name>StringSplit</name>
<prototype>function StringSplit(const S: String; const Separators: TArrayOfString; const Typ: TSplitType): TArrayOfString;</prototype>
<description><p>Splits the given string into substrings, using the given characters or strings to be used as separator. Empty substrings can be ignored.</p>
<p>TSplitType is defined as:</p>
<p><tt>TSplitType = (stAll, stExcludeEmpty, stExcludeLastEmpty);</tt></p></description>
<example><pre>var
A: array of String;
begin
A := StringSplit('1,,2', [','], stExcludeEmpty);
// A = ['1','2']
end;
</pre></example>
<seealso><p><link topic="isxfunc_StringJoin">StringJoin</link><br />
<link topic="isxfunc_StringSplitEx">StringSplitEx</link></p></seealso>
</function>
<function>
<name>StringSplitEx</name>
<prototype>function StringSplitEx(const S: String; const Separators: TArrayOfString; const Quote: Char; const Typ: TSplitType): TArrayOfString;</prototype>
<description><p>Splits the given string into substrings, using the given characters or strings to be used as separator. Empty substrings can be ignored. Use the Quote parameter to specify the start and end character of a quoted part of the string where separators are ignored.</p>
<p>TSplitType is defined as:</p>
<p><tt>TSplitType = (stAll, stExcludeEmpty, stExcludeLastEmpty);</tt></p></description>
<example><pre>var
A: array of String;
begin
A := StringSplitEx('1,",",2', [','], '"', stAll);
// A = ['1','","','2']
end;
</pre></example>
<seealso><p><link topic="isxfunc_StringSplit">StringSplit</link></p></seealso>
</function>
</subcategory>
<subcategory>
<function>
<name>StrToIntDef</name>
<prototype>function StrToIntDef(S: String; Def: LongInt): LongInt;</prototype>
<description><p>The StrToInt function converts the string passed in S into a number. If S does not represent a valid number, StrToInt returns the number passed in Def.</p></description>
</function>
<function>
<name>StrToInt</name>
<prototype>function StrToInt(S: String): LongInt;</prototype>
<description><p>The StrToInt function converts the string passed in S into a number.</p></description>
<remarks><p>Use of <link topic="isxfunc_StrToIntDef">StrToIntDef</link> instead of StrToInt is recommended.</p></remarks>
</function>
<function>
<name>StrToInt64Def</name>