-
Notifications
You must be signed in to change notification settings - Fork 214
/
InnoSetup.iss
1920 lines (1739 loc) · 63.8 KB
/
InnoSetup.iss
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
; 6.2 https://jrsoftware.org/isinfo.php
; https://jrsoftware.org/ishelp/
; https://jrsoftware.org/ispphelp/
[ISPP]
//! directives ===========================================================
#preproc
#define
#dim
#redim
#undef
#include
#file
#emit
#expr
#insert
#append
#if
#elif
#else
#endif
#ifdef
#endif
#ifndef
#endif
#ifexist
#endif
#ifnexist
#endif
#for
#sub
#endsub
#pragma
#error
//! keywords ===========================================================
private protected public
// Components and Tasks Parameters
and or not
//! types ===========================================================
any int str func void
//! Predefined Variables ===================================================
__COUNTER__
__FILE__
__INCLUDE__
__LINE__
__OPT_X__
__WIN32__
ISPP_INVOKED
ISPPCC_INVOKED
PREPROCVER
WINDOWS
UNICODE
CompilerPath
SourcePath
Ver
NewLine
Tab
// others from ISPPBuiltins.iss
True
False
Yes
No
MaxInt
MinInt
NULL
// TypeOf constants
TYPE_ERROR
TYPE_NULL
TYPE_INTEGER
TYPE_STRING
TYPE_MACRO
TYPE_FUNC
TYPE_ARRAY
// ReadReg constants
HKCR HKEY_CLASSES_ROOT
HKCU HKEY_CURRENT_USER
HKLM HKEY_LOCAL_MACHINE
HKU HKEY_USERS
HKCC HKEY_CURRENT_CONFIG
HKCR64 HKEY_CLASSES_ROOT_64
HKCU64 HKEY_CURRENT_USER_64
HKLM64 HKEY_LOCAL_MACHINE_64
HKU64 HKEY_USERS_64
HKCC64 HKEY_CURRENT_CONFIG_64
// Exec constants
SW_HIDE
SW_SHOWNORMAL
SW_NORMAL
SW_SHOWMINIMIZED
SW_SHOWMAXIMIZED
SW_MAXIMIZE
SW_SHOWNOACTIVATE
SW_SHOW
SW_MINIMIZE
SW_SHOWMINNOACTIVE
SW_SHOWNA
SW_RESTORE
SW_SHOWDEFAULT
SW_MAX
// Find constants
FIND_MATCH
FIND_BEGINS
FIND_ENDS
FIND_CONTAINS
FIND_CASESENSITIVE
FIND_SENSITIVE
FIND_AND
FIND_OR
FIND_NOT
FIND_TRIM
// FindFirst constants
faReadOnly
faHidden
faSysFile
faVolumeID
faDirectory
faArchive
faSymLink
faAnyFile
// GetStringFileInfo standard names
COMPANY_NAME
FILE_DESCRIPTION
FILE_VERSION
INTERNAL_NAME
LEGAL_COPYRIGHT
ORIGINAL_FILENAME
PRODUCT_NAME
PRODUCT_VERSION
//! functions ===========================================================
str GetStringFileInfo(str 1, str 2, int? 3)
int Int(any 1, int? 2)
str Str(any)
int FileExists(str)
int DirExists(str)
int ForceDirectories(str)
int FileSize(str)
str ReadIni(str 1, str 2, str 3, str? 4)
void WriteIni(str 1, str 2, str 3, any 4)
str ReadReg(int 1, str 2, str? 3, any? 4)
int Exec(str 1, str? 2, str? 3, int? 4, int? 5)
str Copy(str 1, int 2, int? 3)
int Pos(str 1, str 2)
int RPos(str 1, str 2)
int Len(str)
void SaveToFile(str)
int Find(int 1, str 2, int? 3, str? 4, int? 5, str? 6, int? 7)
str SetupSetting(str)
void SetSetupSetting(str 1, str 2)
str LowerCase(str)
str UpperCase(str)
int EntryCount(str)
str GetEnv(str)
void DeleteFile(str)
void DeleteFileNow(str)
void CopyFile(str 1, str 2)
int FindFirst(str, int)
int FindNext(int)
void FindClose(int)
str FindGetFileName(int)
int FileOpen(str)
str FileRead(int)
void FileReset(int)
int FileEof(int)
void FileClose(int)
int SaveStringToFile(str Filename, str S, int? Append, int? UTF8)
str GetDateTimeString(str, str, str)
str GetFileDateTimeString(str, str, str, str)
str GetMD5OfString(str)
str GetMD5OfUnicodeString(str)
str GetMD5OfFile(str)
str GetSHA1OfString(str)
str GetSHA1OfUnicodeString(str)
str GetSHA1OfFile(str)
str Trim(str)
str StringChange(str, str, str)
int IsWin64()
int Defined(<ident>)
int defined(<ident>)
TypeOf2(any Expr)
int TypeOf(<ident>)
int DimOf(<ident>)
str GetVersionNumbers(str Filename, int *VersionMS, int *VersionLS)
str GetVersionComponents(str Filename, int *Major, int *Minor, int *Revision, int *Build)
str GetVersionNumbersString(str Filename)
str GetPackedVersion(str Filename, int *Version)
int PackVersionNumbers(int VersionMS, int VersionLS)
int PackVersionComponents(int Major, int Minor, int Revision, int Build)
int ComparePackedVersion(int Version1, int Version2)
int SamePackedVersion(int Version1, int Version2)
void UnpackVersionNumbers(int Version, int *VersionMS, int *VersionLS)
void UnpackVersionComponents(int Version, int *Major, int *Minor, int *Revision, int *Build)
void VersionToStr(int Version)
int StrToVersion(str Version)
int EncodeVer(int Major, int Minor, int Revision = 0, int Build = -1)
str DecodeVer(int Version, int Digits = 3)
int FindSection(str Section = "Files")
int FindSectionEnd(str Section = "Files")
int FindCode()
str ExtractFilePath(str PathName)
str ExtractFileDir(str PathName)
str ExtractFileExt(str PathName)
str ExtractFileName(str PathName)
str ChangeFileExt(str FileName, str NewExt)
void RemoveFileExt(str FileName)
str AddBackslash(str S)
str RemoveBackslash(str S)
void Delete(str *S, int Index, int Count = MaxInt)
void Insert(str *S, int Index, str Substr)
int YesNo(str S)
int Power(int X, int P = 2)
int Min(int A, int B, int C = MaxInt)
int Max(int A, int B, int C = MinInt)
int SameText(str S1, str S2)
int SameStr(str S1, str S2)
void Message(str S)
void Warning(str S)
void Error(str S)
// others from ISPPBuiltins.iss
GetFileCompany(str FileName)
GetFileDescription(str FileName)
GetFileVersionString(str FileName)
GetFileCopyright(str FileName)
GetFileOriginalFilename(str FileName)
GetFileProductVersion(str FileName)
DeleteToFirstPeriod(str *S)
FindNextSection(int Line)
IsDirSet(str SetupDirective)
WarnRenamedVersion(str OldName, str NewName)
ParseVersion(str FileName, *Major, *Minor, *Rev, *Build)
GetFileVersion(str FileName)
[Misc]
; pragma options
option
parseroption
inlinestart
inlineend
message
warning
error
verboselevel
include
spansymbol
[Constants]
; Directory Constants
{app}
{win}
{sys}
{sysnative}
{syswow64}
{src}
{sd}
{commonpf}
{commonpf32}
{commonpf64}
{commoncf}
{commoncf32}
{commoncf64}
{tmp}
{commonfonts}
{dao}
{dotnet40}
{dotnet4032}
{dotnet4064}
; Shell Folder Constants
{group}
{localappdata}
{userappdata}
{commonappdata}
{usercf}
{userdesktop}
{commondesktop}
{userdocs}
{commondocs}
{userfavorites}
{userfonts}
{userpf}
{userprograms}
{commonprograms}
{usersavedgames}
{usersendto}
{userstartmenu}
{commonstartmenu}
{userstartup}
{commonstartup}
{usertemplates}
{commontemplates}
; Auto Constants
autoappdata commonappdata userappdata
autocf commoncf usercf
autocf32 commoncf32 usercf
autocf64 commoncf64 usercf
autodesktop commondesktop userdesktop
autodocs commondocs userdocs
autofonts commonfonts userfonts
autopf commonpf userpf
autopf32 commonpf32 userpf
autopf64 commonpf64 userpf
autoprograms commonprograms userprograms
autostartmenu commonstartmenu userstartmenu
autostartup commonstartup userstartup
autotemplates commontemplates usertemplates
; Renamed Constants
cf commoncf
cf32 commoncf32
cf64 commoncf64
fonts commonfonts
pf commonpf
pf32 commonpf32
pf64 commonpf64
sendto usersendto
; Other Constants
{cmd}
{computername}
{drive:Path}
{groupname}
{hwnd}
{wizardhwnd}
{ini:Filename,Section,Key|DefaultValue}
{language}
{cm:MessageName}
{cm:MessageName,Arguments}
{reg:HKxx\SubkeyName,ValueName|DefaultValue}
{param:ParamName|DefaultValue}
{srcexe}
{uninstallexe}
{sysuserinfoname}
{sysuserinfoorg}
{userinfoname}
{userinfoorg}
{userinfoserial}
{username}
{log}
{code:FunctionName|Param}
[Setup]
; Common Parameters
Check:
Languages:
MinVersion:
OnlyBelowVersion:
; Compiler-related
ASLRCompatible=
Compression=
CompressionThreads=
DEPCompatible=
DiskClusterSize=
DiskSliceSize=
DiskSpanning=
Encryption=
InternalCompressLevel=
LZMAAlgorithm=
LZMABlockSize=
LZMADictionarySize=
LZMAMatchFinder=
LZMANumBlockThreads=
LZMANumFastBytes=
LZMAUseSeparateProcess=
MergeDuplicateFiles=
MissingMessagesWarning=
MissingRunOnceIdsWarning=
NotRecognizedMessagesWarning=
Output=
OutputBaseFilename=
OutputDir=
OutputManifestFile=
ReserveBytes=
SignedUninstaller=
SignedUninstallerDir=
SignTool=
SignToolMinimumTimeBetween=
SignToolRetryCount=
SignToolRetryDelay=
SignToolRunMinimized=
SlicesPerDisk=
SolidCompression=
SourceDir=
TerminalServicesAware=
UsedUserAreasWarning=
UseSetupLdr=
VersionInfoCompany=
VersionInfoCopyright=
VersionInfoDescription=
VersionInfoOriginalFileName=
VersionInfoProductName=
VersionInfoProductTextVersion=
VersionInfoProductVersion=
VersionInfoTextVersion=
VersionInfoVersion=
; Installer-related
AllowCancelDuringInstall=
AllowNetworkDrive=
AllowNoIcons=
AllowRootDirectory=
AllowUNCPath=
AlwaysRestart=
AlwaysShowComponentsList=
AlwaysShowDirOnReadyPage=
AlwaysShowGroupOnReadyPage=
AlwaysUsePersonalGroup=
AppendDefaultDirName=
AppendDefaultGroupName=
AppComments=
AppContact=
AppId=
AppModifyPath=
AppMutex=
AppName=
AppPublisher=
AppPublisherURL=
AppReadmeFile=
AppSupportPhone=
AppSupportURL=
AppUpdatesURL=
AppVerName=
AppVersion=
ArchitecturesAllowed=
ArchitecturesInstallIn64BitMode=
ChangesAssociations=
ChangesEnvironment=
CloseApplications=
CloseApplicationsFilter=
CreateAppDir=
CreateUninstallRegKey=
DefaultDialogFontName=
DefaultDirName=
DefaultGroupName=
DefaultUserInfoName=
DefaultUserInfoOrg=
DefaultUserInfoSerial=
DirExistsWarning=
DisableDirPage=
DisableFinishedPage=
DisableProgramGroupPage=
DisableReadyMemo=
DisableReadyPage=
DisableStartupPrompt=
DisableWelcomePage=
EnableDirDoesntExistWarning=
ExtraDiskSpaceRequired=
InfoAfterFile=
InfoBeforeFile=
LanguageDetectionMethod=
LicenseFile=
MinVersion=
OnlyBelowVersion=
Password=
PrivilegesRequired=
PrivilegesRequiredOverridesAllowed=
RestartApplications=
RestartIfNeededByRun=
SetupLogging=
SetupMutex=
ShowLanguageDialog=
TimeStampRounding=
TimeStampsInUTC=
TouchDate=
TouchTime=
Uninstallable=
UninstallDisplayIcon=
UninstallDisplayName=
UninstallDisplaySize=
UninstallFilesDir=
UninstallLogMode=
UninstallRestartComputer=
UpdateUninstallLogAppName=
UsePreviousAppDir=
UsePreviousGroup=
UsePreviousLanguage=
UsePreviousPrivigeles=
UsePreviousSetupType=
UsePreviousTasks=
UsePreviousUserInfo=
UserInfoPage=
; Cosmetic
AppCopyright=
BackColor=
BackColor2=
BackColorDirection=
BackSolid=
FlatComponentsList=
SetupIconFile=
ShowComponentSizes=
ShowTasksTreeLines=
WindowShowCaption=
WindowStartMaximized=
WindowResizable=
WindowVisible=
WizardImageAlphaFormat=
WizardImageFile=
WizardImageStretch=
WizardResizable=
WizardSizePercent=
WizardSmallImageFile=
WizardStyle=
[Types]
Name:
Description:
Flags:
[Components]
Name:
Description:
Types:
ExtraDiskSpaceRequired:
Flags:
[Tasks]
Name:
Description:
GroupDescription:
Components:
Flags:
[Dirs]
Name:
Attribs:
Permissions:
Flags:
[Files]
Source:
DestDir:
DestName:
Excludes:
ExternalSize:
CopyMode:
Attribs:
Permissions:
FontInstall:
StrongAssemblyName:
Flags:
[Icons]
Name:
Filename:
Parameters:
WorkingDir:
HotKey:
Comment:
IconFilename:
IconIndex:
AppUserModelID:
AppUserModelToastActivatorCLSID:
Flags:
[INI]
Filename:
Section:
Key:
String:
Flags:
[InstallDelete]
Type:
Name:
[Languages]
Name:
MessagesFile:
LicenseFile:
InfoBeforeFile:
InfoAfterFile:
[Messages]
BeveledLabel=
HelpTextNote=
[CustomMessages]
NameAndVersion=
AdditionalIcons=
CreateDesktopIcon=
CreateQuickLaunchIcon=
ProgramOnTheWeb=
UninstallProgram=
LaunchProgram=
AssocFileExtension=
AssocingFileExtension=
AutoStartProgramGroupDescription=
AutoStartProgram=
AddonHostProgramNotFound=
[LangOptions]
LanguageName=
LanguageID=
LanguageCodePage=
DialogFontName=
DialogFontSize=
WelcomeFontName=
WelcomeFontSize=
TitleFontName=
TitleFontSize=
CopyrightFontName=
CopyrightFontSize=
RightToLeft=
[Registry]
Root:
Subkey:
ValueName:
ValueData:
Permissions:
Flags:
[Run]
Filename:
Description:
Parameters:
WorkingDir:
StatusMsg:
RunOnceId:
Verb:
Flags:
[UninstallDelete]
Type:
Name:
[UninstallRun]
Filename:
Description:
Parameters:
WorkingDir:
StatusMsg:
RunOnceId:
Verb:
Flags:
[Code]
//! keywords ===========================================================
and
break
const continue constructor
do downto
else event except external
finally for function
if
not
of or
procedure property
read repeat
then to type
until uses
var
while with write
begin
end
case
end
class
end
interface
end
record
end
try
end
//! event ===========================================================
// Setup event functions
function InitializeSetup(): Boolean;
procedure InitializeWizard();
procedure DeinitializeSetup();
procedure CurStepChanged(CurStep: TSetupStep);
procedure CurInstallProgressChanged(CurProgress, MaxProgress: Integer);
function NextButtonClick(CurPageID: Integer): Boolean;
function BackButtonClick(CurPageID: Integer): Boolean;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
function ShouldSkipPage(PageID: Integer): Boolean;
procedure CurPageChanged(CurPageID: Integer);
function CheckPassword(Password: String): Boolean;
function NeedRestart(): Boolean;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
procedure RegisterPreviousData(PreviousDataKey: Integer);
function CheckSerial(Serial: String): Boolean;
function GetCustomSetupExitCode: Integer;
function PrepareToInstall(var NeedsRestart: Boolean): String;
procedure RegisterExtraCloseApplicationsResources;
// Uninstall event functions
function InitializeUninstall(): Boolean;
procedure InitializeUninstallProgressForm();
procedure DeinitializeUninstall();
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
function UninstallNeedRestart(): Boolean;
//! functions ===========================================================
// Setup or Uninstall Info functions
function GetCmdTail: String;
function ParamCount: Integer;
function ParamStr(Index: Integer): String;
function ActiveLanguage: String;
function CustomMessage(const MsgName: String): String;
function FmtMessage(const S: String; const Args: array of String): String;
function SetupMessage(const ID: TSetupMessageID): String;
function WizardDirValue: String;
function WizardGroupValue: String;
function WizardNoIcons: Boolean;
function WizardSetupType(const Description: Boolean): String;
function WizardSelectedComponents(const Descriptions: Boolean): String;
function WizardIsComponentSelected(const Components: String): Boolean;
procedure WizardSelectComponents(const Components: String);
function WizardSelectedTasks(const Descriptions: Boolean): String;
function WizardIsTaskSelected(const Tasks: String): Boolean;
procedure WizardSelectTasks(const Tasks: String);
function WizardSilent: Boolean;
function IsUninstaller: Boolean;
function UninstallSilent: Boolean;
function CurrentFilename: String;
function CurrentSourceFilename: String;
function ExpandConstant(const S: String): String;
function ExpandConstantEx(const S: String; const CustomConst, CustomValue: String): String;
function GetPreviousData(const ValueName, DefaultValueData: String): String;
function SetPreviousData(const PreviousDataKey: Integer; const ValueName, ValueData: String): Boolean;
function Terminated: Boolean;
function RegisterExtraCloseApplicationsResource(const DisableFsRedir: Boolean; const AFilename: String): Boolean;
function RmSessionStarted: Boolean;
function GetWizardForm: TWizardForm;
function GetUninstallProgressForm: TUninstallProgressForm;
function GetMainForm: TMainForm;
// Exception functions
procedure Abort;
procedure RaiseException(const Msg: String);
function GetExceptionMessage: String;
procedure ShowExceptionMessage;
// System functions
function IsAdmin: Boolean;
function IsAdminInstallMode: Boolean;
function GetWindowsVersion: Cardinal;
procedure GetWindowsVersionEx(var Version: TWindowsVersion);
function GetWindowsVersionString: String;
function IsWin64: Boolean;
function Is64BitInstallMode: Boolean;
function ProcessorArchitecture: TSetupProcessorArchitecture;
function IsX86: Boolean;
function IsX64: Boolean;
function IsIA64: Boolean;
function IsARM64: Boolean;
function InstallOnThisVersion(const MinVersion, OnlyBelowVersion: String): Boolean;
function IsDotNetInstalled(const MinVersion: TDotNetVersion; const MinServicePack: Cardinal): Boolean;
function IsMsiProductInstalled(const UpgradeCode: String; const PackedMinVersion: Int64): Boolean;
function GetEnv(const EnvVar: String): String;
function GetUserNameString: String;
function GetComputerNameString: String;
function GetUILanguage: Integer;
function FontExists(const FaceName: String): Boolean;
function FindWindowByClassName(const ClassName: String): HWND;
function FindWindowByWindowName(const WindowName: String): HWND;
function SendMessage(const Wnd: HWND; const Msg, WParam, LParam: Longint): Longint;
function PostMessage(const Wnd: HWND; const Msg, WParam, LParam: Longint): Boolean;
function SendNotifyMessage(const Wnd: HWND; const Msg, WParam, LParam: Longint): Boolean;
function RegisterWindowMessage(const Name: String): Longint;
function SendBroadcastMessage(const Msg, WParam, LParam: Longint): Longint;
function PostBroadcastMessage(const Msg, WParam, LParam: Longint): Boolean;
function SendBroadcastNotifyMessage(const Msg, WParam, LParam: Longint): Boolean;
procedure CreateMutex(const Name: String);
function CheckForMutexes(Mutexes: String): Boolean;
procedure MakePendingFileRenameOperationsChecksum: String;
function CreateCallback(Method: AnyMethod): Longword;
procedure UnloadDLL(Filename: String);
function DLLGetLastError(): Longint;
// String functions
function Chr(B: Byte): Char;
function Ord(C: Char): Byte;
function Copy(S: String; Index, Count: Integer): String;
function Length(s: String): Longint;
function Lowercase(S: String): String;
function Uppercase(S: String): String;
function AnsiLowercase(S: String): String;
function AnsiUppercase(S: String): String;
function StringOfChar(c: Char; I : Longint): String;
procedure Delete(var S: String; Index, Count: Integer);
procedure Insert(Source: String; var Dest: String; Index: Integer);
function StringChange(var S: String; const FromStr, ToStr: String): Integer;
function StringChangeEx(var S: String; const FromStr, ToStr: String; const SupportDBCS: Boolean): Integer;
function Pos(SubStr, S: String): Integer;
function AddQuotes(const S: String): String;
function RemoveQuotes(const S: String): String;
function ConvertPercentStr(var S: String): Boolean;
function CompareText(const S1, S2: string): Integer;
function CompareStr(const S1, S2: string): Integer;
function SameText(const S1, S2: string): Boolean;
function SameStr(const S1, S2: string): Boolan;
function IsWildcard(const Pattern: String): Boolean;
function WildcardMatch(const Text, Pattern: String): Boolean;
function Format(const Format: string; const Args: array of const): string;
function Trim(const S: string): String;
function TrimLeft(const S: string): String;
function TrimRight(const S: string): String;
function StrToIntDef(s: string; def: Longint): Longint;
function StrToInt(s: string): Longint;
function StrToInt64Def(s: string; def: Int64): Int64;
function StrToInt64(s: string): Int64;
function StrToFloat(s: string): Extended;
function IntToStr(i: Int64): String;
function FloatToStr(e: extended): String;
function CharLength(const S: String; const Index: Integer): Integer;
function AddBackslash(const S: String): String;
function RemoveBackslashUnlessRoot(const S: String): String;
function RemoveBackslash(const S: String): String;
function AddPeriod(const S: String): String;
function ChangeFileExt(const FileName, Extension: string): String;
function ExtractFileExt(const FileName: string): String;
function ExtractFileDir(const FileName: string): String;
function ExtractFilePath(const FileName: string): String;
function ExtractFileName(const FileName: string): String;
function ExtractFileDrive(const FileName: string): String;
function ExtractRelativePath(const BaseName, DestName: String): String;
function ExpandFileName(const FileName: string): String;
function ExpandUNCFileName(const FileName: string): String;
function GetDateTimeString(const DateTimeFormat: String; const DateSeparator, TimeSeparator: Char): String;
procedure SetLength(var S: String; L: Longint);
procedure CharToOemBuff(var S: AnsiString);
procedure OemToCharBuff(var S: AnsiString);
function GetMD5OfString(const S: AnsiString): String;
function GetMD5OfUnicodeString(const S: String): String;
function GetSHA1OfString(const S: AnsiString): String;
function GetSHA1OfUnicodeString(const S: String): String;
function GetSHA256OfString(const S: AnsiString): String;
function GetSHA256OfUnicodeString(const S: String): String;
function SysErrorMessage(ErrorCode: Integer): String;
function MinimizePathName(const Filename: String; const Font: TFont; MaxLen: Integer): String;
// Array functions
function GetArrayLength(var Arr: Array): Longint;
procedure SetArrayLength(var Arr: Array; I: Longint);
// Variant functions
function Null: Variant;
function Unassigned: Variant;
function VarIsEmpty(const V: Variant): Boolean;
function VarIsClear(const V: Variant): Boolean;
function VarIsNull(const V: Variant): Boolean;
function VarType(const V: Variant): TVarType;
// File System functions
function DirExists(const Name: String): Boolean;
function FileExists(const Name: String): Boolean;
function FileOrDirExists(const Name: String): Boolean;
function FileSize(const Name: String; var Size: Integer): Boolean;
function FileSize64(const Name: String; var Size: Int64): Boolean;
function GetSpaceOnDisk(const Path: String; const InMegabytes: Boolean; var Free, Total: Cardinal): Boolean;
function GetSpaceOnDisk64(const Path: String; var Free, Total: Int64): Boolean;
function FileSearch(const Name, DirList: string): String;
function FindFirst(const FileName: String; var FindRec: TFindRec): Boolean;
function FindNext(var FindRec: TFindRec): Boolean;
procedure FindClose(var FindRec: TFindRec);
function GetCurrentDir: String;
function SetCurrentDir(const Dir: string): Boolean;
function GetWinDir: String;
function GetSystemDir: String;
function GetSysWow64Dir: String;
function GetTempDir: String;
function GetShellFolderByCSIDL(const Folder: Integer; const Create: Boolean): String;
function GetShortName(const LongName: String): String;
function GenerateUniqueName(Path: String; const Extension: String): String;
function IsProtectedSystemFile(const Filename: String): Boolean;
function GetMD5OfFile(const Filename: String): String;
function GetSHA1OfFile(const Filename: String): String;
function GetSHA256OfFile(const Filename: String): String;
function EnableFsRedirection(const Enable: Boolean): Boolean;
// File functions
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
function ExecAsOriginalUser(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
function ShellExec(const Verb, Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ErrorCode: Integer): Boolean;
function ShellExecAsOriginalUser(const Verb, Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ErrorCode: Integer): Boolean;
procedure ExtractTemporaryFile(const FileName: String);
function ExtractTemporaryFiles(const Pattern: String): Integer;
function DownloadTemporaryFile(const Url, FileName, RequiredSHA256OfFile: String; const OnDownloadProgress: TOnDownloadProgress): Int64;
function DownloadTemporaryFileSize(const Url): Int64;
function RenameFile(const OldName, NewName: string): Boolean;
function FileCopy(const ExistingFile, NewFile: String; const FailIfExists: Boolean): Boolean;
function DeleteFile(const FileName: string): Boolean;
procedure DelayDeleteFile(const Filename: String; const Tries: Integer);
function SetNTFSCompression(const FileOrDir: String; Compress: Boolean): Boolean;
function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean;
function LoadStringsFromFile(const FileName: String; var S: TArrayOfString): Boolean;
function SaveStringToFile(const FileName: String; const S: AnsiString; const Append: Boolean): Boolean;
function SaveStringsToFile(const FileName: String; const S: TArrayOfString; const Append: Boolean): Boolean;
function SaveStringsToUTF8File(const FileName: String; const S: TArrayOfString; const Append: Boolean): Boolean;
function CreateDir(const Dir: string): Boolean;
function ForceDirectories(Dir: string): Boolean;
function RemoveDir(const Dir: string): Boolean;
function DelTree(const Path: String; const IsDir, DeleteFiles, DeleteSubdirsAlso: Boolean): Boolean;
function CreateShellLink(const Filename, Description, ShortcutTo, Parameters, WorkingDir, IconFilename: String; const IconIndex, ShowCmd: Integer): String;
function UnpinShellLink(const Filename: String): Boolean;
procedure RegisterServer(const Is64Bit: Boolean; const Filename: String; const FailCriticalErrors: Boolean);
function UnregisterServer(const Is64Bit: Boolean; const Filename: String; const FailCriticalErrors: Boolean): Boolean;
procedure RegisterTypeLibrary(const Is64Bit: Boolean; const Filename: String);
function UnregisterTypeLibrary(const Is64Bit: Boolean; const Filename: String): Boolean
procedure IncrementSharedCount(const Is64Bit: Boolean; const Filename: String; const AlreadyExisted: Boolean);
function DecrementSharedCount(const Is64Bit: Boolean; const Filename: String): Boolean;
procedure RestartReplace(const TempFile, DestFile: String);
procedure UnregisterFont(const FontName, FontFilename: String; const PerUserFont: Boolean);
function ModifyPifFile(const Filename: String; const CloseOnExit: Boolean): Boolean;
// File Version functions
function GetVersionNumbers(const Filename: String; var VersionMS, VersionLS: Cardinal): Boolean;
function GetVersionComponents(const Filename: String; var Major, Minor, Revision, Build: Word): Boolean;
function GetVersionNumbersString(const Filename: String; var Version: String): Boolean;
function GetPackedVersion(const Filename: String; var Version: Int64): Boolean;
function PackVersionNumbers(const VersionMS, VersionLS: Cardinal): Int64;
function PackVersionComponents(const Major, Minor, Revision, Build: Word): Int64;
function ComparePackedVersion(const Version1, Version2: Int64): Integer;
function SamePackedVersion(const Version1, Version2: Int64): Boolean;
procedure UnpackVersionNumbers(const Version: Int64; var VersionMS, VersionLS: Cardinal);
procedure UnpackVersionComponents(const Version: Int64; var Major, Minor, Revision, Build: Word);
function VersionToStr(const Version: Int64): String;
function StrToVersion(const Version: String; var Version: Int64): Boolean;
// Registry functions
function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;
function RegValueExists(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;
function RegGetSubkeyNames(const RootKey: Integer; const SubKeyName: String; var Names: TArrayOfString): Boolean;
function RegGetValueNames(const RootKey: Integer; const SubKeyName: String; var Names: TArrayOfString): Boolean;
function RegQueryStringValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;
function RegQueryMultiStringValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;
function RegQueryDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultDWord: Cardinal): Boolean;
function RegQueryBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: AnsiString): Boolean;
function RegWriteStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
function RegWriteExpandStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
function RegWriteMultiStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
function RegWriteDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: Cardinal): Boolean;
function RegWriteBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: AnsiString): Boolean;
function RegDeleteKeyIncludingSubkeys(const RootKey: Integer; const SubkeyName: String): Boolean;
function RegDeleteKeyIfEmpty(const RootKey: Integer; const SubkeyName: String): Boolean;
function RegDeleteValue(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;
// INI File functions
function IniKeyExists(const Section, Key, Filename: String): Boolean;
function IsIniSectionEmpty(const Section, Filename: String): Boolean;
function GetIniBool(const Section, Key: String; const Default: Boolean; const Filename: String): Boolean
function GetIniInt(const Section, Key: String; const Default, Min, Max: Longint; const Filename: String): Longint;
function GetIniString(const Section, Key, Default, Filename: String): String;
function SetIniBool(const Section, Key: String; const Value: Boolean; const Filename: String): Boolean;
function SetIniInt(const Section, Key: String; const Value: Longint; const Filename: String): Boolean;
function SetIniString(const Section, Key, Value, Filename: String): Boolean;
procedure DeleteIniSection(const Section, Filename: String);
procedure DeleteIniEntry(const Section, Key, Filename: String);
// Custom Setup Wizard Page functions
function CreateInputQueryPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String): TInputQueryWizardPage;
function CreateInputOptionPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; Exclusive, ListBox: Boolean): TInputOptionWizardPage;
function CreateInputDirPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; AAppendDir: Boolean; ANewFolderName: String): TInputDirWizardPage;
function CreateInputFilePage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String): TInputFileWizardPage;
function CreateOutputMsgPage(const AfterID: Integer; const ACaption, ADescription, AMsg: String): TOutputMsgWizardPage;
function CreateOutputMsgMemoPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; const AMsg: AnsiString): TOutputMsgMemoWizardPage;
function CreateOutputProgressPage(const ACaption, ADescription: String): TOutputProgressWizardPage;
function CreateOutputMarqueeProgressPage(const ACaption, ADescription: String): TOutputMarqueeProgressWizardPage;
function CreateDownloadPage(const ACaption, ADescription: String; const OnDownloadProgress: TOnDownloadProgress): TDownloadWizardPage;
function CreateCustomPage(const AfterID: Integer; const ACaption, ADescription: String): TWizardPage;
function CreateCustomForm: TSetupForm;
function PageFromID(const ID: Integer): TWizardPage;
function PageIndexFromID(const ID: Integer): Integer;
function ScaleX(X: Integer): Integer;
function ScaleY(Y: Integer): Integer;
function InitializeBitmapImageFromIcon(const BitmapImage: TBitmapImage; const IconFilename: String; const BkColor: TColor; const AscendingTrySizes: TArrayOfInteger): Boolean;
// Dialog functions
function MsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons: Integer): Integer;
function SuppressibleMsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons, Default: Integer): Integer;
function TaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer): Integer;
function SuppressibleTaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const Default: Integer): Integer;
function GetOpenFileName(const Prompt: String; var FileName: String; const InitialDirectory, Filter, DefaultExtension: String): Boolean;
function GetOpenFileNameMulti(const Prompt: String; var FileNameList: TStrings; const InitialDirectory, Filter, DefaultExtension: String): Boolean;
function GetSaveFileName(const Prompt: String; var FileName: String; const InitialDirectory, Filter, DefaultExtension: String): Boolean;
function BrowseForFolder(const Prompt: String; var Directory: String; const NewFolderButton: Boolean): Boolean;
function ExitSetupMsgBox: Boolean;
function SelectDisk(const DiskNumber: Integer; const AFilename: String; var Path: String): Boolean;
// COM Automation objects support functions
function CreateOleObject(const ClassName: string): Variant;
function GetActiveOleObject(const ClassName: string): Variant;
function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; Par: array of Variant): Variant;
function CreateComObject(const ClassID: TGUID): IUnknown;
function StringToGUID(const S: String): TGUID;
procedure OleCheck(Result: HResult);
procedure CoFreeUnusedLibraries;