1[Setup]
2AppId={{5A2BC38A-406C-4A5B-BF45-6991F9A05325}
3AppName=PeaZip
4AppVerName=PeaZip 8.1.0 (WIN64)
5AppVersion=8.1.0
6AppPublisher=Giorgio Tani
7AppPublisherURL=https://peazip.github.io
8AppSupportURL=https://peazip.github.io
9AppUpdatesURL=https://peazip.github.io
10DefaultDirName={pf}\PeaZip
11DisableDirPage=no
12DefaultGroupName=PeaZip
13DisableProgramGroupPage=yes
14LicenseFile=C:\input\peazip-8.1.0.WIN64\copying.txt
15OutputDir=C:\output\
16OutputBaseFilename=peazip-8.1.0.WIN64
17SetupIconFile=C:\input\peazip-icon-green.ico
18Compression=lzma2/max
19SolidCompression=yes
20ChangesAssociations=yes
21ArchitecturesInstallIn64BitMode=x64
22ArchitecturesAllowed=x64
23
24[Languages]
25Name: "default"; MessagesFile: "compiler:Default.isl"
26
27[Tasks]
28Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
29Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
30
31[Files]
32Source: "C:\input\peazip-8.1.0.WIN64\peazip.exe"; DestDir: "{app}"; Flags: ignoreversion
33Source: "C:\input\peazip-8.1.0.WIN64\dragdropfilesdll.dll"; DestDir: "{app}"; Flags: ignoreversion
34Source: "C:\input\peazip-8.1.0.WIN64\res\*"; DestDir: "{app}\res"; Flags: ignoreversion recursesubdirs createallsubdirs
35Source: "C:\input\peazip-8.1.0.WIN64\SendTo.pea"; DestDir: "{app}"; Flags: ignoreversion
36Source: "C:\input\peazip-8.1.0.WIN64\copying.txt"; DestDir: "{app}"; Flags: ignoreversion
37Source: "C:\input\peazip-8.1.0.WIN64\readme_Win64.txt"; DestDir: "{app}"; Flags: ignoreversion
38Source: "C:\input\peazip-8.1.0.WIN64\peazip_help.pdf"; DestDir: "{app}"; Flags: ignoreversion
39; NOTE: Don't use "Flags: ignoreversion" on any shared system files
40
41[INI]
42Filename: "{app}\peazip.url"; Section: "InternetShortcut"; Key: "URL"; String: "https://peazip.github.io/"
43
44[Icons]
45Name: "{group}\PeaZip"; Filename: "{app}\peazip.exe"
46; Name: "{group}\Reset PeaZip"; Filename: "{app}\peazip.exe"; Parameters: "-peazipreset"
47Name: "{group}\{cm:ProgramOnTheWeb,PeaZip}"; Filename: "{app}\peazip.url"
48Name: "{group}\{cm:UninstallProgram,PeaZip}"; Filename: "{uninstallexe}"
49Name: "{userdesktop}\PeaZip"; Filename: "{app}\peazip.exe"; Tasks: desktopicon
50Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\PeaZip"; Filename: "{app}\peazip.exe"; Tasks: quicklaunchicon
51Name: "{group}\Add to archive"; Filename: "{app}\peazip.exe"; Parameters: "-add2archive";  IconFilename: "{app}\res\icons\peazip_seven.icl"; IconIndex: 2
52Name: "{group}\Extract..."; Filename: "{app}\peazip.exe"; Parameters: "-ext2main";  IconFilename: "{app}\res\icons\peazip_seven.icl"; IconIndex: 4
53Name: "{group}\Open as archive"; Filename: "{app}\peazip.exe"; Parameters: "-ext2openasarchive";
54Name: "{app}\Add to archive"; Filename: "{app}\peazip.exe"; Parameters: "-add2archive";  IconFilename: "{app}\res\icons\peazip_seven.icl"; IconIndex: 2
55Name: "{app}\Extract..."; Filename: "{app}\peazip.exe"; Parameters: "-ext2main";  IconFilename: "{app}\res\icons\peazip_seven.icl"; IconIndex: 4
56Name: "{app}\Open as archive"; Filename: "{app}\peazip.exe"; Parameters: "-ext2openasarchive";
57
58[Run]
59;Filename: "{app}\peazip.exe"; Description: "{cm:LaunchProgram,PeaZip}"; Flags: nowait postinstall skipifsilent
60;temporarily deactivated since this works correctly (using current user's profile) only for Vista or more recent systems
61
62[InstallDelete]
63Type: filesandordirs; Name: "{app}\res\lang"
64
65[UninstallDelete]
66Type: files; Name: "{app}\peazip.url"
67
68[CustomMessages]
69Associations_Caption=Associations
70Associations_Description=Set file associations
71Associations_Labelfull1_Caption0=Read/write supported types
72Associations_Labelread1_Caption0=Read supported types
73Associations_cb7z_Caption0=7Z, XZ
74Associations_cbbr_Caption0=Brotli
75Associations_cbzst_Caption0=Zstandard
76Associations_cbpaq8_Caption0=*PAQ
77Associations_cbquad_Caption0=QUAD/BALZ/BCM
78Associations_cbtar_Caption0=TAR, BZ2, GZ
79Associations_cbzip_Caption0=ZIP, ZIPX
80Associations_cbfullnone_Caption0=None of the above group (override selection)
81Associations_cbarj_Caption0=ARJ
82Associations_cbcab_Caption0=CAB
83Associations_cblinux_Caption0=Linux (DEB, RPM, PET/PUP, SLP)
84Associations_cbiso_Caption0=ISO, UDF
85Associations_cblha_Caption0=LHA
86Associations_cblzh_Caption0=LZH
87Associations_cbrar_Caption0=RAR
88Associations_cbcpio_Caption0=CPIO, Z
89Associations_cbreadnone_Caption0=None of the above group (override selection)
90Associations_cbace_Caption0=ACE
91Associations_cbarc_Caption0=ARC, WRC
92Associations_cbMac_Caption0=Mac (DMG/HFS)
93context_Caption=Context menu
94context_Description=Create application's entries in system's context menu
95context_cbcontextext_Caption0=Extract...
96context_cbcontextext2here_Caption0=Extract here
97context_cbcontextsplit_Caption0=Split file
98context_cbcontextconvert_Caption0=Convert
99context_cbcontextnone_Caption0=No context menu entry (override selection)
100context_cbcontextext2folder_Caption0=Extract here (in new folder)
101context_cbcontextext2smart_Caption0=Extract here (smart new folder)
102context_cbcontext7zs_Caption0=Add to 7Z
103context_cbcontextzips_Caption0=Add to ZIP
104context_cbcontexttest_Caption0=Test archive(s)
105context_cbcontextwipe_Caption0=Secure delete
106context_cbcontextadd2archive_Caption0=Add to archive
107context_cbcontextadd2archiveseparate_Caption0=Add to separate archive(s)
108context_cbcontextsfx_Caption0=Add to self extracting
109context_CheckBox3f_Caption0=Add to 7Z, fastest
110context_CheckBox3_Caption0=Add to 7Z, ultra
111context_cbcontext7zsenc_Caption0=Encrypt (7Z)
112context_CheckBox4_Caption0=Add to ZIP, fastest
113context_cbcascaded_Caption0=Cascaded menu
114context_cbcontextzipmail_Caption0=Zip and mail
115context_cbcontextbrowse_Caption0=Browse path with PeaZip
116context_cbcontextcrc_Caption0=CRC, hash and file tools
117Links_Caption=SendTo
118Links_Description=Create application's entries in SendTo menu
119Links_cbfunext2here_Caption0=Extract here
120Links_cbfun7z_Caption0=Add to 7Z
121Links_cbfunzip_Caption0=Add to ZIP
122Links_cbfunsfx_Caption0=Add to self extracting
123Links_cbfunsplit_Caption0=Split file
124Links_cbfunnone_Caption0=No SendTo menu entry (override selection)
125Links_cbfunext2folder_Caption0=Extract here (in new folder)
126Links_cbfun7zs_Caption0=Add to separate 7Z
127Links_cbfunzips_Caption0=Add to separate ZIP
128Links_cbfunencrypt_Caption0=Encrypt (PEA)
129Links_cbfuntest_Caption0=Test archive(s)
130Links_cbfunzipmail_Caption0=Add to ZIP and mail
131Links_cbfun7zmail_Caption0=Add to 7Z and mail
132Links_cbfunsfxmail_Caption0=Add to sfx and mail
133Links_cbfunwipe_Caption0=Secure delete
134Links_cbfunext2to_Caption0=Extract...
135Links_CheckBoxbrowsepath_Caption0=Browse path with PeaZip
136Links_CheckBoxcommand_Caption0=Open command prompt here
137Links_cbfunadd_Caption0=Add to archive
138Links_cbfunconvert_Caption0=Convert
139Links_cbfunopen_Caption0=Open as archive
140install_Caption=Install PeaZip
141install_Description=Installation options
142install_Labelinstall1_Caption0=Default installation, context menu and SendTo menu entries
143install_Labelinstall1_Caption2=Configure file associations
144install_RadioButtoninstall1_Caption0=Standard installation
145install_RadioButtoninstall2_Caption0=Custom installation
146install_RadioButtoninstall3_Caption0=No system integration
147install_RadioButtoninstall4_Caption0=Update only, keep current system integration
148install_cbinstallcu_Caption0=Install for current user only
149install_cbreset_Caption0=Reset current configuration
150install_lupdate_Caption0=Check for updates
151install_l1_Caption0=|
152install_lhelp_Caption0=Help
153install_l2_Caption0=|
154install_lfaq_Caption0=FAQ
155install_LabelAppLang_Caption0=Application language
156
157[Code]
158var
159  MyProgChecked: Boolean;
160  MyProgCheckResult: Boolean;
161  FinishedInstall: Boolean;
162  Labelfull1: TLabel;
163  Bevel1: TBevel;
164  Labelread1: TLabel;
165  Bevel2: TBevel;
166  cb7z: TCheckBox;
167  cbbr: TCheckBox;
168  cbzst: TCheckBox;
169  cbpaq8: TCheckBox;
170  cbquad: TCheckBox;
171  cbtar: TCheckBox;
172  cbzip: TCheckBox;
173  cbfullnone: TCheckBox;
174  cbarj: TCheckBox;
175  cbcab: TCheckBox;
176  cblinux: TCheckBox;
177  cbiso: TCheckBox;
178  cblha: TCheckBox;
179  cblzh: TCheckBox;
180  cbrar: TCheckBox;
181  cbcpio: TCheckBox;
182  cbreadnone: TCheckBox;
183	cbace: TCheckBox;
184	cbarc: TCheckBox;
185	cbMac: TCheckBox;
186  Bevel1context: TBevel;
187  cbcontextext: TCheckBox;
188  cbcontextext2here: TCheckBox;
189  cbcontextsplit: TCheckBox;
190  cbcontextconvert: TCheckBox;
191  cbcontextnone: TCheckBox;
192  cbcontextext2folder: TCheckBox;
193  cbcontextext2smart: TCheckBox;
194  cbcontext7zs: TCheckBox;
195  cbcontextzips: TCheckBox;
196  cbcontexttest: TCheckBox;
197  cbcontextwipe: TCheckBox;
198  cbcontextadd2archive: TCheckBox;
199  cbcontextadd2archiveseparate: TCheckBox;
200  cbcontextsfx: TCheckBox;
201  CheckBox3f: TCheckBox;
202  CheckBox3: TCheckBox;
203  cbcontext7zsenc: TCheckBox;
204  CheckBox4: TCheckBox;
205  cbcascaded: TCheckBox;
206  cbcontextzipmail: TCheckBox;
207  cbcontextbrowse: TCheckBox;
208  cbcontextcrc: TCheckBox;
209  Bevel1fun: TBevel;
210  cbfunext2here: TCheckBox;
211  cbfun7z: TCheckBox;
212  cbfunzip: TCheckBox;
213  cbfunsfx: TCheckBox;
214  cbfunsplit: TCheckBox;
215  cbfunnone: TCheckBox;
216  cbfunext2folder: TCheckBox;
217  cbfun7zs: TCheckBox;
218  cbfunzips: TCheckBox;
219  cbfunencrypt: TCheckBox;
220  cbfuntest: TCheckBox;
221  cbfunzipmail: TCheckBox;
222  cbfun7zmail: TCheckBox;
223  cbfunsfxmail: TCheckBox;
224  cbfunwipe: TCheckBox;
225  cbfunext2to: TCheckBox;
226  CheckBoxbrowsepath: TCheckBox;
227  CheckBoxcommand: TCheckBox;
228  cbfunadd: TCheckBox;
229  cbfunconvert: TCheckBox;
230  cbfunopen: TCheckBox;
231  Labelinstall1: TLabel;
232  RadioButtoninstall1: TRadioButton;
233  RadioButtoninstall2: TRadioButton;
234  RadioButtoninstall3: TRadioButton;
235  RadioButtoninstall4: TRadioButton;
236  LabelAppLang: TLabel;
237  ComboBox1: TComboBox;
238  cbinstallcu: TCheckbox;
239  cbreset: TCheckbox;
240  lupdate: TLabel;
241  l1: TLabel;
242  lhelp: TLabel;
243  l2: TLabel;
244  lfaq: TLabel;
245  sLMCU:integer;
246
247{ install_Activate }
248
249procedure install_Activate(Page: TWizardPage);
250begin
251  // enter code here...
252end;
253
254{ install_ShouldSkipPage }
255
256function install_ShouldSkipPage(Page: TWizardPage): Boolean;
257begin
258  Result := False;
259end;
260
261{ install_BackButtonClick }
262
263function install_BackButtonClick(Page: TWizardPage): Boolean;
264begin
265  Result := True;
266end;
267
268{ install_NextkButtonClick }
269
270function install_NextButtonClick(Page: TWizardPage): Boolean;
271begin
272  Result := True;
273end;
274
275{ install_CancelButtonClick }
276
277procedure install_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
278begin
279  // enter code here...
280end;
281
282procedure install_lupdateClick(Sender: TObject);
283var
284  ErrorCode: Integer;
285begin
286   ShellExecAsOriginalUser('open', 'https://peazip.github.io/', '', '', SW_SHOW, ewNoWait, ErrorCode);
287end;
288
289procedure install_lhelpClick(Sender: TObject);
290var
291  ErrorCode: Integer;
292begin
293   ShellExecAsOriginalUser('open', 'https://peazip.github.io/peazip-help.html', '', '', SW_SHOW, ewNoWait, ErrorCode)
294end;
295
296procedure install_lfaqClick(Sender: TObject);
297var
298  ErrorCode: Integer;
299begin
300   ShellExecAsOriginalUser('open', 'https://peazip.github.io/peazip-help-faq.html', '', '', SW_SHOW, ewNoWait, ErrorCode)
301end;
302
303function install_CreatePage(PreviousPageId: Integer): Integer;
304var
305  Page: TWizardPage;
306  i:integer;
307  l:string;
308begin
309  Page := CreateCustomPage(
310    PreviousPageId,
311    ExpandConstant('{cm:install_Caption}'),
312	  ExpandConstant('{cm:install_Description}')
313  );
314
315{ Labelinstall1 }
316  Labelinstall1 := TLabel.Create(Page);
317  with Labelinstall1 do
318  begin
319    Parent := Page.Surface;
320    Caption :=
321      ExpandConstant('{cm:install_Labelinstall1_Caption0}') + #13 +
322      ExpandConstant('{cm:install_Labelinstall1_Caption2}');
323    Left := ScaleX(32);
324    Top := ScaleY(26);
325    Width := ScaleX(363);
326    Height := ScaleY(64);
327  end;
328
329  { RadioButtoninstall1 }
330  RadioButtoninstall1 := TRadioButton.Create(Page);
331  with RadioButtoninstall1 do
332  begin
333    Parent := Page.Surface;
334    Caption := ExpandConstant('{cm:install_RadioButtoninstall1_Caption0}');
335    Left := ScaleX(16);
336    Top := ScaleY(0);
337    Width := ScaleX(385);
338    Height := ScaleY(25);
339    Checked := True;
340    TabOrder := 0;
341    TabStop := True;
342  end;
343
344  { RadioButtoninstall2 }
345  RadioButtoninstall2 := TRadioButton.Create(Page);
346  with RadioButtoninstall2 do
347  begin
348    Parent := Page.Surface;
349    Caption := ExpandConstant('{cm:install_RadioButtoninstall2_Caption0}');
350    Left := ScaleX(16);
351    Top := ScaleY(60);
352    Width := ScaleX(385);
353    Height := ScaleY(25);
354    TabOrder := 1;
355    TabStop := True;
356  end;
357
358  { RadioButtoninstall3 }
359  RadioButtoninstall3 := TRadioButton.Create(Page);
360  with RadioButtoninstall3 do
361  begin
362    Parent := Page.Surface;
363    Caption := ExpandConstant('{cm:install_RadioButtoninstall3_Caption0}');
364    Left := ScaleX(16);
365    Top := ScaleY(80);
366    Width := ScaleX(385);
367    Height := ScaleY(25);
368    TabOrder := 2;
369    TabStop := True;
370  end;
371
372  { RadioButtoninstall4 }
373  RadioButtoninstall4 := TRadioButton.Create(Page);
374  with RadioButtoninstall4 do
375  begin
376    Parent := Page.Surface;
377    Caption := ExpandConstant('{cm:install_RadioButtoninstall4_Caption0}');
378    Left := ScaleX(16);
379    Top := ScaleY(100);
380    Width := ScaleX(385);
381    Height := ScaleY(25);
382    TabOrder := 3;
383    TabStop := True;
384  end;
385
386  { LabelAppLang }
387  LabelAppLang := TLabel.Create(Page);
388  with LabelAppLang do
389  begin
390    Parent := Page.Surface;
391    Caption := ExpandConstant('{cm:install_LabelAppLang_Caption0}');
392    Left := ScaleX(16);
393    Top := ScaleY(143);
394    Width := ScaleX(99);
395    Height := ScaleY(13);
396  end;
397  if (GetWindowsVersion < $06000000) then LabelAppLang.visible:=false;
398
399  { ComboBox1 }
400  ComboBox1 := TComboBox.Create(Page);
401  with ComboBox1 do
402  begin
403    Parent := Page.Surface;
404    Left := ScaleX(128);
405    Top := ScaleY(140);
406    Width := ScaleX(240);
407    Height := ScaleY(21);
408    TabOrder := 4;
409    Style := csDropDownList;
410    Text := 'EN - English';
411    Items.Add('AR - Arabic');
412    Items.Add('BG - Bulgarian');
413    Items.Add('BY-CR - Belarusian (Cyrillic)');
414    Items.Add('BY-LT - Belarusian (Latin)');
415    Items.Add('CHS - Chinese Simplified');
416    Items.Add('CHT - Chinese Traditional');
417    Items.Add('CZ - Czech');
418    Items.Add('DE-UML - German');
419    Items.Add('DE-UML-ALT - German (alternative)');
420    Items.Add('Default / Do not change current language');
421    Items.Add('EN - English');
422    Items.Add('EN-GB - British English');
423    Items.Add('ES-ES - Spanish');
424    Items.Add('ES-LA - Spanish (Latin-America)');
425    Items.Add('EU - Basque');
426    Items.Add('FI - Finnish');
427    Items.Add('FR - French');
428    Items.Add('GL - Galician');
429    Items.Add('GR - Greek');
430    Items.Add('HU - Hungarian');
431    Items.Add('ID - Bahasa Indonesia');
432    Items.Add('IT - Italian');
433    Items.Add('JA - Japanese');
434    Items.Add('KO - Korean');
435    Items.Add('NL - Dutch');
436    Items.Add('NO - Norwegian');
437    Items.Add('PL - Polish');
438    Items.Add('PT-BR - Portuguese (Brazil)');
439    Items.Add('PT-PT - Portuguese (Portugal)');
440    Items.Add('RO - Romanian');
441    Items.Add('RU - Russian');
442    Items.Add('SI - Sinhala');
443    Items.Add('SK - Slovak');
444    Items.Add('SL - Slovenian');
445    Items.Add('SV - Swedish');
446    Items.Add('TJ - Tajik');
447    Items.Add('TR - Turkish');
448    Items.Add('UK - Ukrainian');
449    Items.Add('UZ - Uzbek');
450    Items.Add('VN - Vietnamese');
451    ItemIndex := 9;
452  end;
453  if (GetWindowsVersion < $06000000) then ComboBox1.visible:=false;
454
455  try
456  l:=uppercase(paramstr(paramcount));
457  if length(l)>0 then if l[1]='/' then l:=copy(l,2,length(l)-1);
458  case l of
459  'AR': i:=0;
460  'BG': i:=1;
461  'BY-CR','BY': i:=2;
462  'BY-LT': i:=3;
463  'CHS','CH': i:=4;
464  'CHT': i:=5;
465  'CZ': i:=6;
466  'DE-UML','DE': i:=7;
467  'DEFAULT': i:=9;
468  'EN': i:=10;
469  'EN-GB': i:=11;
470  'ES-ES','ES': i:=12;
471  'ES-LA': i:=13;
472  'EU': i:=14;
473  'FI': i:=15;
474  'FR': i:=16;
475  'GL': i:=17;
476  'GR': i:=18;
477  'HU': i:=19;
478  'ID': i:=20;
479  'IT': i:=21;
480  'JA': i:=22;
481  'KO': i:=23;
482  'NL': i:=24;
483  'NO': i:=25;
484  'PL': i:=26;
485  'PT-BR': i:=27;
486  'PT-PT','PT': i:=28;
487  'RO': i:=29;
488  'RU': i:=30;
489  'SI': i:=31;
490  'SK': i:=32;
491  'SL': i:=33;
492  'SV': i:=34;
493  'TJ': i:=35;
494  'TR': i:=36;
495  'UK': i:=37;
496  'UZ': i:=38;
497  'VN': i:=39;
498  else i:=9;
499  end;
500  if i>=0 then
501     combobox1.itemindex:=i;
502  except
503  end;
504
505  { cbinstallcu }
506  cbinstallcu := Tcheckbox.Create(Page);
507  with cbinstallcu do
508  begin
509    Parent := Page.Surface;
510    Caption := ExpandConstant('{cm:install_cbinstallcu_Caption0}');
511    Left := ScaleX(16);
512    Top := ScaleY(170);
513    Width := ScaleX(160);
514    Height := ScaleY(25);
515  end;
516
517  { cbreset }
518  cbreset := Tcheckbox.Create(Page);
519  with cbreset do
520  begin
521    Parent := Page.Surface;
522    Caption := ExpandConstant('{cm:install_cbreset_Caption0}');
523    Left := ScaleX(16);
524    Top := ScaleY(203);
525    Width := ScaleX(160);
526    Height := ScaleY(25);
527  end;
528  if (GetWindowsVersion < $06000000) then cbreset.visible:=false;
529
530  { lupdate }
531  lupdate := TLabel.Create(Page);
532  with lupdate do
533  begin
534    Parent := Page.Surface;
535    Caption := ExpandConstant('{cm:install_lupdate_Caption0}');
536    Left := ScaleX(220);
537    Top := ScaleY(208);
538    Width := ScaleX(88);
539    Height := ScaleY(13);
540    Cursor := crHand;
541    Font.Color := 16711680;
542    Font.Height := ScaleY(-11);
543    Font.Name := 'Tahoma';
544    Font.Style := [fsUnderline];
545    OnClick := @install_lupdateClick;
546  end;
547
548  { l1 }
549  l1 := TLabel.Create(Page);
550  with l1 do
551  begin
552    Parent := Page.Surface;
553    Caption := ExpandConstant('{cm:install_l1_Caption0}');
554    Left := ScaleX(316);
555    Top := ScaleY(208);
556    Width := ScaleX(4);
557    Height := ScaleY(13);
558    Font.Height := ScaleY(-11);
559    Font.Name := 'Tahoma';
560  end;
561
562  { lhelp }
563  lhelp := TLabel.Create(Page);
564  with lhelp do
565  begin
566    Parent := Page.Surface;
567    Caption := ExpandConstant('{cm:install_lhelp_Caption0}');
568    Left := ScaleX(328);
569    Top := ScaleY(208);
570    Width := ScaleX(21);
571    Height := ScaleY(13);
572    Cursor := crHand;
573    Font.Color := 16711680;
574    Font.Height := ScaleY(-11);
575    Font.Name := 'Tahoma';
576    Font.Style := [fsUnderline];
577    OnClick := @install_lhelpClick;
578  end;
579
580  { l2 }
581  l2 := TLabel.Create(Page);
582  with l2 do
583  begin
584    Parent := Page.Surface;
585    Caption := ExpandConstant('{cm:install_l2_Caption0}');
586    Left := ScaleX(357);
587    Top := ScaleY(208);
588    Width := ScaleX(4);
589    Height := ScaleY(13);
590    Font.Height := ScaleY(-11);
591    Font.Name := 'Tahoma';
592  end;
593
594  { lfaq }
595  lfaq := TLabel.Create(Page);
596  with lfaq do
597  begin
598    Parent := Page.Surface;
599    Caption := ExpandConstant('{cm:install_lfaq_Caption0}');
600    Left := ScaleX(369);
601    Top := ScaleY(208);
602    Width := ScaleX(21);
603    Height := ScaleY(13);
604    Cursor := crHand;
605    Font.Color := 16711680;
606    Font.Height := ScaleY(-11);
607    Font.Name := 'Tahoma';
608    Font.Style := [fsUnderline];
609    OnClick := @install_lfaqClick;
610  end;
611
612  with Page do
613  begin
614    OnActivate := @install_Activate;
615    OnShouldSkipPage := @install_ShouldSkipPage;
616    OnBackButtonClick := @install_BackButtonClick;
617    OnNextButtonClick := @install_NextButtonClick;
618    OnCancelButtonClick := @install_CancelButtonClick;
619  end;
620
621  Result := Page.ID;
622end;
623
624				{ Associations_Activate }
625
626				procedure Associations_Activate(Page: TWizardPage);
627				begin
628				  // enter code here...
629				end;
630
631				{ Associations_ShouldSkipPage }
632
633				function Associations_ShouldSkipPage(Page: TWizardPage): Boolean;
634				begin
635				  if (radiobuttoninstall3.Checked = True) or (radiobuttoninstall4.Checked = True) then Result := True
636          else Result := False;
637				end;
638
639				{ Associations_BackButtonClick }
640
641				function Associations_BackButtonClick(Page: TWizardPage): Boolean;
642				begin
643				  Result := True;
644				end;
645
646				{ Associations_NextkButtonClick }
647
648				function Associations_NextButtonClick(Page: TWizardPage): Boolean;
649				begin
650				  Result := True;
651				end;
652
653				{ Associations_CancelButtonClick }
654
655				procedure Associations_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
656				begin
657				  // enter code here...
658				end;
659
660				{ Associations_CreatePage }
661
662				function Associations_CreatePage(PreviousPageId: Integer): Integer;
663				var
664				  Page: TWizardPage;
665				begin
666				  Page := CreateCustomPage(
667				    PreviousPageId,
668				    ExpandConstant('{cm:Associations_Caption}'),
669				    ExpandConstant('{cm:Associations_Description}')
670				  );
671
672{ Labelfull1 }
673Labelfull1 := TLabel.Create(Page);
674with Labelfull1 do
675begin
676  Parent := Page.Surface;
677  Caption := ExpandConstant('{cm:Associations_Labelfull1_Caption0}');
678  Left := ScaleX(0);
679  Top := ScaleY(0);
680  Width := ScaleX(163);
681  Height := ScaleY(13);
682  Font.Color := -16777208;
683  Font.Height := ScaleY(-11);
684  Font.Name := 'Tahoma';
685  Font.Style := [fsBold];
686  WordWrap := True;
687end;
688
689{ Bevel1 }
690Bevel1 := TBevel.Create(Page);
691with Bevel1 do
692begin
693  Parent := Page.Surface;
694  Left := ScaleX(0);
695  Top := ScaleY(20);
696  Width := ScaleX(410);
697  Height := ScaleY(52);
698end;
699
700{ Labelread1 }
701Labelread1 := TLabel.Create(Page);
702with Labelread1 do
703begin
704  Parent := Page.Surface;
705  Caption := ExpandConstant('{cm:Associations_Labelread1_Caption0}');
706  Left := ScaleX(0);
707  Top := ScaleY(112);
708  Width := ScaleX(128);
709  Height := ScaleY(13);
710  Font.Color := -16777208;
711  Font.Height := ScaleY(-11);
712  Font.Name := 'Tahoma';
713  Font.Style := [fsBold];
714  WordWrap := True;
715end;
716
717{ Bevel2 }
718Bevel2 := TBevel.Create(Page);
719with Bevel2 do
720begin
721  Parent := Page.Surface;
722  Left := ScaleX(0);
723  Top := ScaleY(132);
724  Width := ScaleX(410);
725  Height := ScaleY(78);
726end;
727
728{ cb7z }
729cb7z := TCheckBox.Create(Page);
730with cb7z do
731begin
732  Parent := Page.Surface;
733  Caption := ExpandConstant('{cm:Associations_cb7z_Caption0}');
734  Left := ScaleX(6);
735  Top := ScaleY(24);
736  Width := ScaleX(81);
737  Height := ScaleY(17);
738  Checked := True;
739  State := cbChecked;
740  TabOrder := 2;
741end;
742
743{ cbarc }
744cbarc := TCheckBox.Create(Page);
745with cbarc do
746begin
747  Parent := Page.Surface;
748  Caption := ExpandConstant('{cm:Associations_cbarc_Caption0}');
749  Left := ScaleX(110);
750  Top := ScaleY(24);
751  Width := ScaleX(73);
752  Height := ScaleY(17);
753  Checked := True;
754  State := cbChecked;
755  TabOrder := 3;
756end;
757
758{ cbbr }
759cbbr := TCheckBox.Create(Page);
760with cbbr do
761begin
762  Parent := Page.Surface;
763  Caption := ExpandConstant('{cm:Associations_cbbr_Caption0}');
764  Left := ScaleX(214);
765  Top := ScaleY(24);
766  Width := ScaleX(73);
767  Height := ScaleY(17);
768  Checked := True;
769  State := cbChecked;
770  TabOrder := 4;
771end;
772
773{ cbpaq8 }
774cbpaq8 := TCheckBox.Create(Page);
775with cbpaq8 do
776begin
777  Parent := Page.Surface;
778  Caption := ExpandConstant('{cm:Associations_cbpaq8_Caption0}');
779  Left := ScaleX(318);
780  Top := ScaleY(24);
781  Width := ScaleX(81);
782  Height := ScaleY(17);
783  Checked := True;
784  State := cbChecked;
785  TabOrder := 5;
786end;
787
788{ cbquad }
789cbquad := TCheckBox.Create(Page);
790with cbquad do
791begin
792  Parent := Page.Surface;
793  Caption := ExpandConstant('{cm:Associations_cbquad_Caption0}');
794  Left := ScaleX(6);
795  Top := ScaleY(48);
796  Width := ScaleX(100);
797  Height := ScaleY(17);
798  Checked := True;
799  State := cbChecked;
800  TabOrder := 6;
801end;
802
803{ cbtar }
804cbtar := TCheckBox.Create(Page);
805with cbtar do
806begin
807  Parent := Page.Surface;
808  Caption := ExpandConstant('{cm:Associations_cbtar_Caption0}');
809  Left := ScaleX(110);
810  Top := ScaleY(48);
811  Width := ScaleX(73);
812  Height := ScaleY(17);
813  Checked := True;
814  State := cbChecked;
815  TabOrder := 7;
816end;
817
818{ cbzip }
819cbzip := TCheckBox.Create(Page);
820with cbzip do
821begin
822  Parent := Page.Surface;
823  Caption := ExpandConstant('{cm:Associations_cbzip_Caption0}');
824  Left := ScaleX(214);
825  Top := ScaleY(48);
826  Width := ScaleX(81);
827  Height := ScaleY(17);
828  Checked := True;
829  State := cbChecked;
830  TabOrder := 8;
831end;
832
833{ cbzst }
834cbzst := TCheckBox.Create(Page);
835with cbzst do
836begin
837  Parent := Page.Surface;
838  Caption := ExpandConstant('{cm:Associations_cbzst_Caption0}');
839  Left := ScaleX(318);
840  Top := ScaleY(48);
841  Width := ScaleX(81);
842  Height := ScaleY(17);
843  Checked := True;
844  State := cbChecked;
845  TabOrder := 9;
846end;
847
848{ cbfullnone }
849cbfullnone := TCheckBox.Create(Page);
850with cbfullnone do
851begin
852  Parent := Page.Surface;
853  Caption := ExpandConstant('{cm:Associations_cbfullnone_Caption0}');
854  Left := ScaleX(0);
855  Top := ScaleY(74);
856  Width := ScaleX(321);
857  Height := ScaleY(25);
858  TabOrder := 0;
859end;
860
861{ cbarj }
862cbarj := TCheckBox.Create(Page);
863with cbarj do
864begin
865  Parent := Page.Surface;
866  Caption := ExpandConstant('{cm:Associations_cbarj_Caption0}');
867  Left := ScaleX(110);
868  Top := ScaleY(136);
869  Width := ScaleX(81);
870  Height := ScaleY(17);
871  Checked := True;
872  State := cbChecked;
873  TabOrder := 11;
874end;
875
876{ cbcab }
877cbcab := TCheckBox.Create(Page);
878with cbcab do
879begin
880  Parent := Page.Surface;
881  Caption := ExpandConstant('{cm:Associations_cbcab_Caption0}');
882  Left := ScaleX(214);
883  Top := ScaleY(136);
884  Width := ScaleX(73);
885  Height := ScaleY(17);
886  Checked := True;
887  State := cbChecked;
888  TabOrder := 12;
889end;
890
891{ cblinux }
892cblinux := TCheckBox.Create(Page);
893with cblinux do
894begin
895  Parent := Page.Surface;
896  Caption := ExpandConstant('{cm:Associations_cblinux_Caption0}');
897  Left := ScaleX(6);
898  Top := ScaleY(184);
899  Width := ScaleX(200);
900  Height := ScaleY(17);
901  Checked := True;
902  State := cbChecked;
903  TabOrder := 18;
904end;
905
906{ cbiso }
907cbiso := TCheckBox.Create(Page);
908with cbiso do
909begin
910  Parent := Page.Surface;
911  Caption := ExpandConstant('{cm:Associations_cbiso_Caption0}');
912  Left := ScaleX(6);
913  Top := ScaleY(160);
914  Width := ScaleX(81);
915  Height := ScaleY(17);
916  TabOrder := 14;
917end;
918
919{ cblha }
920cblha := TCheckBox.Create(Page);
921with cblha do
922begin
923  Parent := Page.Surface;
924  Caption := ExpandConstant('{cm:Associations_cblha_Caption0}');
925  Left := ScaleX(110);
926  Top := ScaleY(160);
927  Width := ScaleX(73);
928  Height := ScaleY(17);
929  Checked := True;
930  State := cbChecked;
931  TabOrder := 15;
932end;
933
934{ cblzh }
935cblzh := TCheckBox.Create(Page);
936with cblzh do
937begin
938  Parent := Page.Surface;
939  Caption := ExpandConstant('{cm:Associations_cblzh_Caption0}');
940  Left := ScaleX(214);
941  Top := ScaleY(160);
942  Width := ScaleX(73);
943  Height := ScaleY(17);
944  Checked := True;
945  State := cbChecked;
946  TabOrder := 16;
947end;
948
949{ cbrar }
950cbrar := TCheckBox.Create(Page);
951with cbrar do
952begin
953  Parent := Page.Surface;
954  Caption := ExpandConstant('{cm:Associations_cbrar_Caption0}');
955  Left := ScaleX(318);
956  Top := ScaleY(160);
957  Width := ScaleX(81);
958  Height := ScaleY(17);
959  Checked := True;
960  State := cbChecked;
961  TabOrder := 17;
962end;
963
964{ cbcpio }
965cbcpio := TCheckBox.Create(Page);
966with cbcpio do
967begin
968  Parent := Page.Surface;
969  Caption := ExpandConstant('{cm:Associations_cbcpio_Caption0}');
970  Left := ScaleX(318);
971  Top := ScaleY(136);
972  Width := ScaleX(73);
973  Height := ScaleY(17);
974  Checked := True;
975  State := cbChecked;
976  TabOrder := 13;
977end;
978
979{ cbreadnone }
980cbreadnone := TCheckBox.Create(Page);
981with cbreadnone do
982begin
983  Parent := Page.Surface;
984  Caption := ExpandConstant('{cm:Associations_cbreadnone_Caption0}');
985  Left := ScaleX(0);
986  Top := ScaleY(210);
987  Width := ScaleX(329);
988  Height := ScaleY(25);
989  TabOrder := 1;
990end;
991
992{ cbace }
993cbace := TCheckBox.Create(Page);
994with cbace do
995begin
996  Parent := Page.Surface;
997  Caption := ExpandConstant('{cm:Associations_cbace_Caption0}');
998  Left := ScaleX(6);
999  Top := ScaleY(136);
1000  Width := ScaleX(81);
1001  Height := ScaleY(17);
1002  Checked := True;
1003  State := cbChecked;
1004  TabOrder := 10;
1005end;
1006
1007{ cbMac }
1008cbMac := TCheckBox.Create(Page);
1009with cbMac do
1010begin
1011  Parent := Page.Surface;
1012  Caption := ExpandConstant('{cm:Associations_cbMac_Caption0}');
1013  Left := ScaleX(214);
1014  Top := ScaleY(184);
1015  Width := ScaleX(200);
1016  Height := ScaleY(17);
1017  Checked := True;
1018  State := cbChecked;
1019  TabOrder := 19;
1020end;
1021
1022				  with Page do
1023				  begin
1024				    OnActivate := @Associations_Activate;
1025				    OnShouldSkipPage := @Associations_ShouldSkipPage;
1026				    OnBackButtonClick := @Associations_BackButtonClick;
1027				    OnNextButtonClick := @Associations_NextButtonClick;
1028				    OnCancelButtonClick := @Associations_CancelButtonClick;
1029				  end;
1030
1031				  Result := Page.ID;
1032				end;
1033
1034{ context_Activate }
1035
1036procedure context_Activate(Page: TWizardPage);
1037begin
1038  // enter code here...
1039end;
1040
1041{ context_ShouldSkipPage }
1042
1043function context_ShouldSkipPage(Page: TWizardPage): Boolean;
1044begin
1045	if (radiobuttoninstall1.Checked = True) or (radiobuttoninstall3.Checked = True) or (radiobuttoninstall4.Checked = True) then Result := True
1046  else Result := False;
1047end;
1048
1049{ context_BackButtonClick }
1050
1051function context_BackButtonClick(Page: TWizardPage): Boolean;
1052begin
1053  Result := True;
1054end;
1055
1056{ context_NextkButtonClick }
1057
1058function context_NextButtonClick(Page: TWizardPage): Boolean;
1059begin
1060  Result := True;
1061end;
1062
1063{ context_CancelButtonClick }
1064
1065procedure context_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
1066begin
1067  // enter code here...
1068end;
1069
1070{ context_CreatePage }
1071
1072function context_CreatePage(PreviousPageId: Integer): Integer;
1073var
1074  Page: TWizardPage;
1075begin
1076  Page := CreateCustomPage(
1077    PreviousPageId,
1078    ExpandConstant('{cm:context_Caption}'),
1079    ExpandConstant('{cm:context_Description}')
1080  );
1081
1082{ Bevel1context }
1083  Bevel1context := TBevel.Create(Page);
1084  with Bevel1context do
1085  begin
1086    Parent := Page.Surface;
1087    Left := ScaleX(8);
1088    Top := ScaleY(2);
1089    Width := ScaleX(396);
1090    Height := ScaleY(210);
1091  end;
1092
1093  { cbcontextnone }
1094  cbcontextnone := TCheckBox.Create(Page);
1095  with cbcontextnone do
1096  begin
1097    Parent := Page.Surface;
1098    Caption := ExpandConstant('{cm:context_cbcontextnone_Caption0}');
1099    Left := ScaleX(8);
1100    Top := ScaleY(214);
1101    Width := ScaleX(240);
1102    Height := ScaleY(17);
1103    TabOrder := 0;
1104  end;
1105
1106  { cbcascaded }
1107  cbcascaded := TCheckBox.Create(Page);
1108  with cbcascaded do
1109  begin
1110    Parent := Page.Surface;
1111    Caption := ExpandConstant('{cm:context_cbcascaded_Caption0}');
1112    Left := ScaleX(260);
1113    Top := ScaleY(214);
1114    Width := ScaleX(185);
1115    Height := ScaleY(17);
1116    Checked := True;
1117    State := cbChecked;
1118    TabOrder := 1;
1119  end;
1120  if (GetWindowsVersion <= $06000000) then cbcascaded.visible:=false;
1121
1122  { cbcontextadd2archive }
1123  cbcontextadd2archive := TCheckBox.Create(Page);
1124  with cbcontextadd2archive do
1125  begin
1126    Parent := Page.Surface;
1127    Caption := ExpandConstant('{cm:context_cbcontextadd2archive_Caption0}');
1128    Left := ScaleX(16);
1129    Top := ScaleY(8);
1130    Width := ScaleX(169);
1131    Height := ScaleY(17);
1132    Checked := True;
1133    State := cbChecked;
1134    TabOrder := 2;
1135  end;
1136
1137  { cbcontextadd2archiveseparate }
1138  cbcontextadd2archiveseparate := TCheckBox.Create(Page);
1139  with cbcontextadd2archiveseparate do
1140  begin
1141    Parent := Page.Surface;
1142    Caption := ExpandConstant('{cm:context_cbcontextadd2archiveseparate_Caption0}');
1143    Left := ScaleX(16);
1144    Top := ScaleY(28);
1145    Width := ScaleX(169);
1146    Height := ScaleY(17);
1147    TabOrder := 3;
1148  end;
1149
1150  { cbcontextsfx }
1151  cbcontextsfx := TCheckBox.Create(Page);
1152  with cbcontextsfx do
1153  begin
1154    Parent := Page.Surface;
1155    Caption := ExpandConstant('{cm:context_cbcontextsfx_Caption0}');
1156    Left := ScaleX(16);
1157    Top := ScaleY(48);
1158    Width := ScaleX(169);
1159    Height := ScaleY(17);
1160    TabOrder := 4;
1161  end;
1162
1163  { cbcontext7zs }
1164  cbcontext7zs := TCheckBox.Create(Page);
1165  with cbcontext7zs do
1166  begin
1167    Parent := Page.Surface;
1168    Caption := ExpandConstant('{cm:context_cbcontext7zs_Caption0}');
1169    Left := ScaleX(16);
1170    Top := ScaleY(68);
1171    Width := ScaleX(169);
1172    Height := ScaleY(17);
1173    Checked := True;
1174    State := cbChecked;
1175    TabOrder := 5;
1176  end;
1177
1178  { CheckBox3f }
1179  CheckBox3f := TCheckBox.Create(Page);
1180  with CheckBox3f do
1181  begin
1182    Parent := Page.Surface;
1183    Caption := ExpandConstant('{cm:context_CheckBox3f_Caption0}');
1184    Left := ScaleX(16);
1185    Top := ScaleY(88);
1186    Width := ScaleX(169);
1187    Height := ScaleY(17);
1188    TabOrder := 6;
1189  end;
1190
1191  { CheckBox3 }
1192  CheckBox3 := TCheckBox.Create(Page);
1193  with CheckBox3 do
1194  begin
1195    Parent := Page.Surface;
1196    Caption := ExpandConstant('{cm:context_CheckBox3_Caption0}');
1197    Left := ScaleX(16);
1198    Top := ScaleY(108);
1199    Width := ScaleX(169);
1200    Height := ScaleY(17);
1201    TabOrder := 7;
1202  end;
1203
1204  { cbcontextzips }
1205  cbcontextzips := TCheckBox.Create(Page);
1206  with cbcontextzips do
1207  begin
1208    Parent := Page.Surface;
1209    Caption := ExpandConstant('{cm:context_cbcontextzips_Caption0}');
1210    Left := ScaleX(16);
1211    Top := ScaleY(128);
1212    Width := ScaleX(169);
1213    Height := ScaleY(17);
1214    Checked := True;
1215    State := cbChecked;
1216    TabOrder := 8;
1217  end;
1218
1219  { CheckBox4 }
1220  CheckBox4 := TCheckBox.Create(Page);
1221  with CheckBox4 do
1222  begin
1223    Parent := Page.Surface;
1224    Caption := ExpandConstant('{cm:context_CheckBox4_Caption0}');
1225    Left := ScaleX(16);
1226    Top := ScaleY(148);
1227    Width := ScaleX(169);
1228    Height := ScaleY(17);
1229    TabOrder := 9;
1230  end;
1231
1232  { cbcontext7zsenc }
1233  cbcontext7zsenc := TCheckBox.Create(Page);
1234  with cbcontext7zsenc do
1235  begin
1236    Parent := Page.Surface;
1237    Caption := ExpandConstant('{cm:context_cbcontext7zsenc_Caption0}');
1238    Left := ScaleX(16);
1239    Top := ScaleY(168);
1240    Width := ScaleX(169);
1241    Height := ScaleY(17);
1242    Checked := True;
1243    State := cbChecked;
1244    TabOrder := 10;
1245  end;
1246
1247  { cbcontextzipmail }
1248  cbcontextzipmail := TCheckBox.Create(Page);
1249  with cbcontextzipmail do
1250  begin
1251    Parent := Page.Surface;
1252    Caption := ExpandConstant('{cm:context_cbcontextzipmail_Caption0}');
1253    Left := ScaleX(16);
1254    Top := ScaleY(188);
1255    Width := ScaleX(169);
1256    Height := ScaleY(17);
1257    TabOrder := 11;
1258  end;
1259
1260  { cbcontextsplit }
1261  cbcontextsplit := TCheckBox.Create(Page);
1262  with cbcontextsplit do
1263  begin
1264    Parent := Page.Surface;
1265    Caption := ExpandConstant('{cm:context_cbcontextsplit_Caption0}');
1266    Left := ScaleX(208);
1267    Top := ScaleY(8);
1268    Width := ScaleX(177);
1269    Height := ScaleY(17);
1270    TabOrder := 12;
1271  end;
1272
1273  { cbcontextconvert }
1274  cbcontextconvert := TCheckBox.Create(Page);
1275  with cbcontextconvert do
1276  begin
1277    Parent := Page.Surface;
1278    Caption := ExpandConstant('{cm:context_cbcontextconvert_Caption0}');
1279    Left := ScaleX(208);
1280    Top := ScaleY(28);
1281    Width := ScaleX(177);
1282    Height := ScaleY(17);
1283    Checked := True;
1284    State := cbChecked;
1285    TabOrder := 13;
1286  end;
1287
1288  { cbcontextext }
1289  cbcontextext := TCheckBox.Create(Page);
1290  with cbcontextext do
1291  begin
1292    Parent := Page.Surface;
1293    Caption := ExpandConstant('{cm:context_cbcontextext_Caption0}');
1294    Left := ScaleX(208);
1295    Top := ScaleY(48);
1296    Width := ScaleX(193);
1297    Height := ScaleY(17);
1298    Checked := True;
1299    State := cbChecked;
1300    TabOrder := 14;
1301  end;
1302
1303  { cbcontextext2here }
1304  cbcontextext2here := TCheckBox.Create(Page);
1305  with cbcontextext2here do
1306  begin
1307    Parent := Page.Surface;
1308    Caption := ExpandConstant('{cm:context_cbcontextext2here_Caption0}');
1309    Left := ScaleX(208);
1310    Top := ScaleY(68);
1311    Width := ScaleX(193);
1312    Height := ScaleY(17);
1313    Checked := True;
1314    State := cbChecked;
1315    TabOrder := 15;
1316  end;
1317
1318  { cbcontextext2smart }
1319  cbcontextext2smart := TCheckBox.Create(Page);
1320  with cbcontextext2smart do
1321  begin
1322    Parent := Page.Surface;
1323    Caption := ExpandConstant('{cm:context_cbcontextext2smart_Caption0}');
1324    Left := ScaleX(208);
1325    Top := ScaleY(88);
1326    Width := ScaleX(177);
1327    Height := ScaleY(17);
1328    Checked := True;
1329    State := cbChecked;
1330    TabOrder := 16;
1331  end;
1332
1333  { cbcontextext2folder }
1334  cbcontextext2folder := TCheckBox.Create(Page);
1335  with cbcontextext2folder do
1336  begin
1337    Parent := Page.Surface;
1338    Caption := ExpandConstant('{cm:context_cbcontextext2folder_Caption0}');
1339    Left := ScaleX(208);
1340    Top := ScaleY(108);
1341    Width := ScaleX(177);
1342    Height := ScaleY(17);
1343    TabOrder := 17;
1344  end;
1345
1346  { cbcontexttest }
1347  cbcontexttest := TCheckBox.Create(Page);
1348  with cbcontexttest do
1349  begin
1350    Parent := Page.Surface;
1351    Caption := ExpandConstant('{cm:context_cbcontexttest_Caption0}');
1352    Left := ScaleX(208);
1353    Top := ScaleY(128);
1354    Width := ScaleX(185);
1355    Height := ScaleY(17);
1356    TabOrder := 18;
1357  end;
1358
1359  { cbcontextbrowse }
1360  cbcontextbrowse := TCheckBox.Create(Page);
1361  with cbcontextbrowse do
1362  begin
1363    Parent := Page.Surface;
1364    Caption := ExpandConstant('{cm:context_cbcontextbrowse_Caption0}');
1365    Left := ScaleX(208);
1366    Top := ScaleY(148);
1367    Width := ScaleX(169);
1368    Height := ScaleY(17);
1369    Checked := True;
1370    State := cbChecked;
1371    TabOrder := 19;
1372  end;
1373
1374  { cbcontextcrc }
1375  cbcontextcrc := TCheckBox.Create(Page);
1376  with cbcontextcrc do
1377  begin
1378    Parent := Page.Surface;
1379    Caption := ExpandConstant('{cm:context_cbcontextcrc_Caption0}');
1380    Left := ScaleX(208);
1381    Top := ScaleY(168);
1382    Width := ScaleX(169);
1383    Height := ScaleY(17);
1384    Checked := True;
1385    State := cbChecked;
1386    TabOrder := 20;
1387  end;
1388
1389  { cbcontextwipe }
1390  cbcontextwipe := TCheckBox.Create(Page);
1391  with cbcontextwipe do
1392  begin
1393    Parent := Page.Surface;
1394    Caption := ExpandConstant('{cm:context_cbcontextwipe_Caption0}');
1395    Left := ScaleX(208);
1396    Top := ScaleY(188);
1397    Width := ScaleX(177);
1398    Height := ScaleY(17);
1399    TabOrder := 21;
1400  end;
1401
1402  with Page do
1403  begin
1404    OnActivate := @context_Activate;
1405    OnShouldSkipPage := @context_ShouldSkipPage;
1406    OnBackButtonClick := @context_BackButtonClick;
1407    OnNextButtonClick := @context_NextButtonClick;
1408    OnCancelButtonClick := @context_CancelButtonClick;
1409  end;
1410
1411  Result := Page.ID;
1412end;
1413
1414{ Links_Activate }
1415
1416procedure Links_Activate(Page: TWizardPage);
1417begin
1418  // enter code here...
1419end;
1420
1421{ Links_ShouldSkipPage }
1422
1423function Links_ShouldSkipPage(Page: TWizardPage): Boolean;
1424begin
1425if (radiobuttoninstall1.Checked = True) or (radiobuttoninstall3.Checked = True) or (radiobuttoninstall4.Checked = True) then Result := True
1426else Result := False;
1427end;
1428
1429{ Links_BackButtonClick }
1430
1431function Links_BackButtonClick(Page: TWizardPage): Boolean;
1432begin
1433  Result := True;
1434end;
1435
1436{ Links_NextkButtonClick }
1437
1438function Links_NextButtonClick(Page: TWizardPage): Boolean;
1439begin
1440  Result := True;
1441end;
1442
1443{ Links_CancelButtonClick }
1444
1445procedure Links_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
1446begin
1447  // enter code here...
1448end;
1449
1450{ Links_CreatePage }
1451
1452function Links_CreatePage(PreviousPageId: Integer): Integer;
1453var
1454  Page: TWizardPage;
1455begin
1456  Page := CreateCustomPage(
1457    PreviousPageId,
1458    ExpandConstant('{cm:Links_Caption}'),
1459    ExpandConstant('{cm:Links_Description}')
1460  );
1461
1462{ Bevel1fun }
1463  Bevel1fun := TBevel.Create(Page);
1464  with Bevel1fun do
1465  begin
1466    Parent := Page.Surface;
1467    Left := ScaleX(8);
1468    Top := ScaleY(2);
1469    Width := ScaleX(396);
1470    Height := ScaleY(210);
1471  end;
1472
1473  { cbfunext2here }
1474  cbfunext2here := TCheckBox.Create(Page);
1475  with cbfunext2here do
1476  begin
1477    Parent := Page.Surface;
1478    Caption := ExpandConstant('{cm:Links_cbfunext2here_Caption0}');
1479    Left := ScaleX(208);
1480    Top := ScaleY(48);
1481    Width := ScaleX(177);
1482    Height := ScaleY(17);
1483    Checked := True;
1484    State := cbChecked;
1485    TabOrder := 12;
1486  end;
1487
1488  { cbfun7z }
1489  cbfun7z := TCheckBox.Create(Page);
1490  with cbfun7z do
1491  begin
1492    Parent := Page.Surface;
1493    Caption := ExpandConstant('{cm:Links_cbfun7z_Caption0}');
1494    Left := ScaleX(16);
1495    Top := ScaleY(28);
1496    Width := ScaleX(169);
1497    Height := ScaleY(17);
1498    TabOrder := 2;
1499  end;
1500
1501  { cbfunzip }
1502  cbfunzip := TCheckBox.Create(Page);
1503  with cbfunzip do
1504  begin
1505    Parent := Page.Surface;
1506    Caption := ExpandConstant('{cm:Links_cbfunzip_Caption0}');
1507    Left := ScaleX(16);
1508    Top := ScaleY(88);
1509    Width := ScaleX(177);
1510    Height := ScaleY(17);
1511    TabOrder := 5;
1512  end;
1513
1514  { cbfunsfx }
1515  cbfunsfx := TCheckBox.Create(Page);
1516  with cbfunsfx do
1517  begin
1518    Parent := Page.Surface;
1519    Caption := ExpandConstant('{cm:Links_cbfunsfx_Caption0}');
1520    Left := ScaleX(16);
1521    Top := ScaleY(148);
1522    Width := ScaleX(177);
1523    Height := ScaleY(17);
1524    TabOrder := 8;
1525  end;
1526
1527  { cbfunsplit }
1528  cbfunsplit := TCheckBox.Create(Page);
1529  with cbfunsplit do
1530  begin
1531    Parent := Page.Surface;
1532    Caption := ExpandConstant('{cm:Links_cbfunsplit_Caption0}');
1533    Left := ScaleX(208);
1534    Top := ScaleY(168);
1535    Width := ScaleX(177);
1536    Height := ScaleY(17);
1537    TabOrder := 19;
1538  end;
1539
1540    { cbfunconvert }
1541  cbfunconvert := TCheckBox.Create(Page);
1542  with cbfunconvert do
1543  begin
1544    Parent := Page.Surface;
1545    Caption := ExpandConstant('{cm:Links_cbfunconvert_Caption0}');
1546    Left := ScaleX(208);
1547    Top := ScaleY(188);
1548    Width := ScaleX(169);
1549    Height := ScaleY(17);
1550    TabOrder := 20;
1551  end;
1552
1553  { cbfunnone }
1554  cbfunnone := TCheckBox.Create(Page);
1555  with cbfunnone do
1556  begin
1557    Parent := Page.Surface;
1558    Caption := ExpandConstant('{cm:Links_cbfunnone_Caption0}');
1559    Left := ScaleX(8);
1560    Top := ScaleY(214);
1561    Width := ScaleX(321);
1562    Height := ScaleY(17);
1563    TabOrder := 0;
1564  end;
1565
1566  { cbfunext2folder }
1567  cbfunext2folder := TCheckBox.Create(Page);
1568  with cbfunext2folder do
1569  begin
1570    Parent := Page.Surface;
1571    Caption := ExpandConstant('{cm:Links_cbfunext2folder_Caption0}');
1572    Left := ScaleX(208);
1573    Top := ScaleY(68);
1574    Width := ScaleX(180);
1575    Height := ScaleY(17);
1576    Checked := True;
1577    State := cbChecked;
1578    TabOrder := 13;
1579  end;
1580
1581  { cbfun7zs }
1582  cbfun7zs := TCheckBox.Create(Page);
1583  with cbfun7zs do
1584  begin
1585    Parent := Page.Surface;
1586    Caption := ExpandConstant('{cm:Links_cbfun7zs_Caption0}');
1587    Left := ScaleX(32);
1588    Top := ScaleY(48);
1589    Width := ScaleX(161);
1590    Height := ScaleY(17);
1591    TabOrder := 3;
1592  end;
1593
1594  { cbfunzips }
1595  cbfunzips := TCheckBox.Create(Page);
1596  with cbfunzips do
1597  begin
1598    Parent := Page.Surface;
1599    Caption := ExpandConstant('{cm:Links_cbfunzips_Caption0}');
1600    Left := ScaleX(32);
1601    Top := ScaleY(108);
1602    Width := ScaleX(153);
1603    Height := ScaleY(17);
1604    TabOrder := 6;
1605  end;
1606
1607  { cbfunencrypt }
1608  cbfunencrypt := TCheckBox.Create(Page);
1609  with cbfunencrypt do
1610  begin
1611    Parent := Page.Surface;
1612    Caption := ExpandConstant('{cm:Links_cbfunencrypt_Caption0}');
1613    Left := ScaleX(16);
1614    Top := ScaleY(188);
1615    Width := ScaleX(169);
1616    Height := ScaleY(17);
1617    TabOrder := 10;
1618  end;
1619
1620  { cbfuntest }
1621  cbfuntest := TCheckBox.Create(Page);
1622  with cbfuntest do
1623  begin
1624    Parent := Page.Surface;
1625    Caption := ExpandConstant('{cm:Links_cbfuntest_Caption0}');
1626    Left := ScaleX(208);
1627    Top := ScaleY(108);
1628    Width := ScaleX(185);
1629    Height := ScaleY(17);
1630    Checked := True;
1631    State := cbChecked;
1632    TabOrder := 15;
1633  end;
1634
1635  { cbfunzipmail }
1636  cbfunzipmail := TCheckBox.Create(Page);
1637  with cbfunzipmail do
1638  begin
1639    Parent := Page.Surface;
1640    Caption := ExpandConstant('{cm:Links_cbfunzipmail_Caption0}');
1641    Left := ScaleX(32);
1642    Top := ScaleY(128);
1643    Width := ScaleX(153);
1644    Height := ScaleY(17);
1645    TabOrder := 7;
1646  end;
1647
1648  { cbfun7zmail }
1649  cbfun7zmail := TCheckBox.Create(Page);
1650  with cbfun7zmail do
1651  begin
1652    Parent := Page.Surface;
1653    Caption := ExpandConstant('{cm:Links_cbfun7zmail_Caption0}');
1654    Left := ScaleX(32);
1655    Top := ScaleY(68);
1656    Width := ScaleX(161);
1657    Height := ScaleY(17);
1658    TabOrder := 4;
1659  end;
1660
1661  { cbfunsfxmail }
1662  cbfunsfxmail := TCheckBox.Create(Page);
1663  with cbfunsfxmail do
1664  begin
1665    Parent := Page.Surface;
1666    Caption := ExpandConstant('{cm:Links_cbfunsfxmail_Caption0}');
1667    Left := ScaleX(32);
1668    Top := ScaleY(168);
1669    Width := ScaleX(161);
1670    Height := ScaleY(17);
1671    TabOrder := 9;
1672  end;
1673
1674  { cbfunwipe }
1675  cbfunwipe := TCheckBox.Create(Page);
1676  with cbfunwipe do
1677  begin
1678    Parent := Page.Surface;
1679    Caption := ExpandConstant('{cm:Links_cbfunwipe_Caption0}');
1680    Left := ScaleX(208);
1681    Top := ScaleY(148);
1682    Width := ScaleX(169);
1683    Height := ScaleY(17);
1684    TabOrder := 18;
1685  end;
1686
1687  { cbfunext2to }
1688  cbfunext2to := TCheckBox.Create(Page);
1689  with cbfunext2to do
1690  begin
1691    Parent := Page.Surface;
1692    Caption := ExpandConstant('{cm:Links_cbfunext2to_Caption0}');
1693    Left := ScaleX(208);
1694    Top := ScaleY(88);
1695    Width := ScaleX(177);
1696    Height := ScaleY(17);
1697    Checked := True;
1698    State := cbChecked;
1699    TabOrder := 14;
1700  end;
1701
1702  { CheckBoxbrowsepath }
1703  CheckBoxbrowsepath := TCheckBox.Create(Page);
1704  with CheckBoxbrowsepath do
1705  begin
1706    Parent := Page.Surface;
1707    Caption := ExpandConstant('{cm:Links_CheckBoxbrowsepath_Caption0}');
1708    Left := ScaleX(208);
1709    Top := ScaleY(8);
1710    Width := ScaleX(177);
1711    Height := ScaleY(17);
1712    Checked := True;
1713    State := cbChecked;
1714    TabOrder := 16;
1715  end;
1716
1717  { CheckBoxcommand }
1718  CheckBoxcommand := TCheckBox.Create(Page);
1719  with CheckBoxcommand do
1720  begin
1721    Parent := Page.Surface;
1722    Caption := ExpandConstant('{cm:Links_CheckBoxcommand_Caption0}');
1723    Left := ScaleX(208);
1724    Top := ScaleY(128);
1725    Width := ScaleX(177);
1726    Height := ScaleY(17);
1727    TabOrder := 17;
1728  end;
1729
1730  { cbfunadd }
1731  cbfunadd := TCheckBox.Create(Page);
1732  with cbfunadd do
1733  begin
1734    Parent := Page.Surface;
1735    Caption := ExpandConstant('{cm:Links_cbfunadd_Caption0}');
1736    Left := ScaleX(16);
1737    Top := ScaleY(8);
1738    Width := ScaleX(169);
1739    Height := ScaleY(17);
1740    Checked := True;
1741    State := cbChecked;
1742    TabOrder := 1;
1743  end;
1744
1745  { cbfunopen }
1746  cbfunopen := TCheckBox.Create(Page);
1747  with cbfunopen do
1748  begin
1749    Parent := Page.Surface;
1750    Caption := ExpandConstant('{cm:Links_cbfunopen_Caption0}');
1751    Left := ScaleX(208);
1752    Top := ScaleY(28);
1753    Width := ScaleX(169);
1754    Height := ScaleY(17);
1755    Checked := True;
1756    State := cbChecked;
1757    TabOrder := 11;
1758  end;
1759
1760  with Page do
1761  begin
1762    OnActivate := @Links_Activate;
1763    OnShouldSkipPage := @Links_ShouldSkipPage;
1764    OnBackButtonClick := @Links_BackButtonClick;
1765    OnNextButtonClick := @Links_NextButtonClick;
1766    OnCancelButtonClick := @Links_CancelButtonClick;
1767  end;
1768
1769  Result := Page.ID;
1770end;
1771
1772				{ InitializeWizard }
1773
1774				procedure InitializeWizard();
1775				begin
1776          Associations_CreatePage(wpSelectDir);//InfoBefore);
1777				  Links_CreatePage(wpSelectDir);
1778				  context_CreatePage(wpSelectDir);
1779				  install_CreatePage(wpInfoBefore);//(wpWelcome);
1780				end;
1781
1782function shouldskippage(CurPageID: Integer): Boolean;
1783begin
1784if (radiobuttoninstall1.Checked = True) or (radiobuttoninstall4.Checked = True) then
1785   begin
1786   if curpageid=wpSelectDir then Result := True;
1787	 if curpageid=wpSelectTasks then Result := True;
1788	 end;
1789end;
1790
1791procedure clearlinks;
1792begin
1793deletefile(expandconstant('{sendto}')+'\Add to archive.lnk');
1794deletefile(expandconstant('{sendto}')+'\Convert.lnk');
1795deletefile(expandconstant('{sendto}')+'\Add to 7Z.lnk');
1796deletefile(expandconstant('{sendto}')+'\Add to 7Z and send by mail.lnk');
1797deletefile(expandconstant('{sendto}')+'\Add to separate 7Z.lnk');
1798deletefile(expandconstant('{sendto}')+'\Add to ZIP.lnk');
1799deletefile(expandconstant('{sendto}')+'\Add to ZIP and send by mail.lnk');
1800deletefile(expandconstant('{sendto}')+'\Add to separate ZIP.lnk');
1801deletefile(expandconstant('{sendto}')+'\Add to self-extracting archive.lnk');
1802deletefile(expandconstant('{sendto}')+'\Add to sfx and send by mail.lnk');
1803deletefile(expandconstant('{sendto}')+'\Encrypt (PEA).lnk');
1804deletefile(expandconstant('{sendto}')+'\Split file.lnk');
1805deletefile(expandconstant('{sendto}')+'\Secure delete.lnk');
1806deletefile(expandconstant('{sendto}')+'\Extract here.lnk');
1807deletefile(expandconstant('{sendto}')+'\Extract....lnk');
1808deletefile(expandconstant('{sendto}')+'\Extract here (in new folder).lnk');
1809deletefile(expandconstant('{sendto}')+'\Open with PeaZip.lnk');
1810deletefile(expandconstant('{sendto}')+'\Test archive(s).lnk');
1811deletefile(expandconstant('{sendto}')+'\Open as archive.lnk');
1812deletefile(expandconstant('{sendto}')+'\Browse path with PeaZip.lnk');
1813deletefile(expandconstant('{sendto}')+'\Open command prompt here.lnk');
1814//legacy
1815deletefile(expandconstant('{sendto}')+'\Encrypt.lnk');
1816deletefile(expandconstant('{sendto}')+'\Add to .7Z.lnk');
1817deletefile(expandconstant('{sendto}')+'\Add to .7Z and send by mail.lnk');
1818deletefile(expandconstant('{sendto}')+'\Add to separate .7Z.lnk');
1819deletefile(expandconstant('{sendto}')+'\Add to .ZIP.lnk');
1820deletefile(expandconstant('{sendto}')+'\Add to .ZIP and send by mail.lnk');
1821deletefile(expandconstant('{sendto}')+'\Add to separate .ZIP.lnk');
1822end;
1823
1824procedure clearcontextlegacy;
1825begin
1826RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\SOFTWARE\Classes\*\shell\Add to archive');
1827RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to 7Z');
1828RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Encrypt (7Z)');
1829RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to 7Z, fastest');
1830RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to 7Z, normal');
1831RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to 7Z, ultra');
1832RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to ZIP');
1833RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to ZIP, fastest');
1834RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to ZIP, normal');
1835RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to ZIP, ultra');
1836RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Zip and mail');
1837RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to self-extracting archive');
1838RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to separate archive(s)');
1839RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to separate 7Z');
1840RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to separate ZIP');
1841RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Open as archive');
1842RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Browse path with PeaZip');
1843RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Split file');
1844RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Convert');
1845RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Secure delete');
1846RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\CRC, hash and file tools');
1847RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Extract...');
1848RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Extract here');
1849RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Extract here (smart new folder)');
1850RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Extract here (in new folder)');
1851RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Test archive(s)');
1852RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to archive');
1853RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to 7Z');
1854RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Encrypt (7Z)');
1855RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, fastest');
1856RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, normal');
1857RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, ultra');
1858RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to ZIP');
1859RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, fastest');
1860RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, normal');
1861RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, ultra');
1862RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Zip and mail');
1863RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to self-extracting archive');
1864RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to separate archive(s)');
1865RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to separate 7Z');
1866RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to separate ZIP');
1867RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Browse path with PeaZip');
1868RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Split file');
1869RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Convert');
1870RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Secure delete');
1871RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\CRC, hash and file tools');
1872RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Extract...');
1873//local
1874RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\SOFTWARE\Classes\*\shell\Add to archive');
1875RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to 7Z');
1876RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Encrypt (7Z)');
1877RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, fastest');
1878RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, normal');
1879RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, ultra');
1880RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to ZIP');
1881RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to ZIP, fastest');
1882RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to ZIP, normal');
1883RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to ZIP, ultra');
1884RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Zip and mail');
1885RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to self-extracting archive');
1886RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to separate archive(s)');
1887RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to separate 7Z');
1888RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to separate ZIP');
1889RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Open as archive');
1890RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Browse path with PeaZip');
1891RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Split file');
1892RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Convert');
1893RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Secure delete');
1894RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\CRC, hash and file tools');
1895RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Extract...');
1896RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Extract here');
1897RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Extract here (smart new folder)');
1898RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Extract here (in new folder)');
1899RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Test archive(s)');
1900RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to archive');
1901RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z');
1902RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Encrypt (7Z)');
1903RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, fastest');
1904RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, normal');
1905RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, ultra');
1906RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP');
1907RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, fastest');
1908RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, normal');
1909RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, ultra');
1910RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Zip and mail');
1911RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to self-extracting archive');
1912RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to separate archive(s)');
1913RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to separate 7Z');
1914RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to separate ZIP');
1915RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Browse path with PeaZip');
1916RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Split file');
1917RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Convert');
1918RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Secure delete');
1919RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\CRC, hash and file tools');
1920RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Extract...');
1921//legacy
1922RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .7Z');
1923RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .7Z, fastest');
1924RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .7Z, normal');
1925RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .7Z, ultra');
1926RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .ZIP');
1927RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .ZIP, fastest');
1928RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .ZIP, normal');
1929RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to .ZIP, ultra');
1930RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to separate .7Z');
1931RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\Add to separate .ZIP');
1932RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .7Z');
1933RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .7Z, fastest');
1934RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .7Z, normal');
1935RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .7Z, ultra');
1936RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP');
1937RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP, fastest');
1938RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP, normal');
1939RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP, ultra');
1940RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to separate .7Z');
1941RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\Directory\shell\Add to separate .ZIP');
1942RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .7Z');
1943RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .7Z, fastest');
1944RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .7Z, normal');
1945RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .7Z, ultra');
1946RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .ZIP');
1947RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .ZIP, fastest');
1948RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .ZIP, normal');
1949RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to .ZIP, ultra');
1950RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to separate .7Z');
1951RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\Add to separate .ZIP');
1952RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .7Z');
1953RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .7Z, fastest');
1954RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .7Z, normal');
1955RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .7Z, ultra');
1956RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP');
1957RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP, fastest');
1958RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP, normal');
1959RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to .ZIP, ultra');
1960RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to separate .7Z');
1961RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\Directory\shell\Add to separate .ZIP');
1962end;
1963
1964procedure clearcontextseven;
1965var s3264:integer;
1966begin
1967RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\*\shell\PeaZip');
1968RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip');
1969RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\*\shell\PeaZip');
1970RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip');
1971if IsWin64 then s3264:=HKLM64 else s3264:=HKLM32;
1972   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate');
1973   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesingle');
1974   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7z');
1975   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zencrypt');
1976   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest');
1977   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7znormal');
1978   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zultra');
1979   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezip');
1980   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipfastest');
1981   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipnormal');
1982   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipultra');
1983   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipmail');
1984   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesfx');
1985   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browseasarchive');
1986   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browsepath');
1987   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2split');
1988   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2convert');
1989   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2wipe');
1990   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2here');
1991   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2smart');
1992   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2folder');
1993   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2main');
1994   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2a');
1995   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2test');
1996   RegDeleteKeyIncludingSubkeys(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.analyze');
1997end;
1998
1999procedure clearassociations;
2000begin
2001if RegKeyExists(HKLM, 'SOFTWARE\Classes\SOFTWARE\PeaZip') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\SOFTWARE\PeaZip');
2002if RegKeyExists(HKLM, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional');
2003if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PEA') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PEA');
2004if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.001') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.001');
2005if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.7Z') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.7Z');
2006if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.XZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.XZ');
2007if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ARC') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ARC');
2008if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.WRC') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.WRC');
2009if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.BR') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.BR');
2010if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ZST') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ZST');
2011if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TZST') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TZST');
2012if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.LPAQ1') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.LPAQ1');
2013if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.LPAQ5') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.LPAQ5');
2014if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.LPAQ8') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.LPAQ8');
2015if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8F') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8F');
2016if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8JD') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8JD');
2017if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8L') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8L');
2018if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8O') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PAQ8O');
2019if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ZPAQ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ZPAQ');
2020if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.QUAD') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.QUAD');
2021if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.BALZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.BALZ');
2022if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.BCM') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.BCM');
2023if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TAR') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TAR');
2024if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.GZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.GZ');
2025if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TGZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TGZ');
2026if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.BZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.BZ');
2027if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.BZ2') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.BZ2');
2028if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TBZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TBZ');
2029if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TBZ2') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TBZ2');
2030if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ZIP') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ZIP');
2031if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ZIPX') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ZIPX');
2032if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ACE') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ACE');
2033if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ARJ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ARJ');
2034if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.CAB') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.CAB');
2035if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.CPIO') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.CPIO');
2036if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.Z') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.Z');
2037if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TZ');
2038if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.TAZ') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.TAZ');
2039if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.ISO') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.ISO');
2040if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.UDF') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.UDF');
2041if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.LHA') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.LHA');
2042if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.DEB') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.DEB');
2043if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PET') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PET');
2044if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.PUP') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.PUP');
2045if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.RPM') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.RPM');
2046if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.SLP') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.SLP');
2047if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.LZH') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.LZH');
2048if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.DMG') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.DMG');
2049if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.HFS') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.HFS');
2050if RegKeyExists(HKLM, 'SOFTWARE\Classes\PeaZip.RAR') then RegDeleteKeyIncludingSubkeys(HKLM, 'SOFTWARE\Classes\PeaZip.RAR');
2051//local
2052if RegKeyExists(HKCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip');
2053if RegKeyExists(HKCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional');
2054if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PEA') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PEA');
2055if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.001') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.001');
2056if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.7Z') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.7Z');
2057if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.XZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.XZ');
2058if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ARC') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ARC');
2059if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.WRC') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.WRC');
2060if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.BR') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.BR');
2061if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ZST') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ZST');
2062if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TZST') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TZST');
2063if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.LPAQ1') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.LPAQ1');
2064if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.LPAQ5') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.LPAQ5');
2065if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.LPAQ8') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.LPAQ8');
2066if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8F') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8F');
2067if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8JD') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8JD');
2068if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8L') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8L');
2069if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8O') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PAQ8O');
2070if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ZPAQ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ZPAQ');
2071if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.QUAD') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.QUAD');
2072if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.BALZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.BALZ');
2073if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.BCM') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.BCM');
2074if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TAR') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TAR');
2075if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.GZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.GZ');
2076if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TGZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TGZ');
2077if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.BZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.BZ');
2078if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.BZ2') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.BZ2');
2079if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TBZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TBZ');
2080if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TBZ2') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TBZ2');
2081if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ZIP') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ZIP');
2082if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ZIPX') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ZIPX');
2083if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ACE') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ACE');
2084if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ARJ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ARJ');
2085if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.CAB') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.CAB');
2086if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.CPIO') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.CPIO');
2087if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.Z') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.Z');
2088if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TZ');
2089if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.TAZ') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.TAZ');
2090if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.ISO') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.ISO');
2091if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.UDF') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.UDF');
2092if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.LHA') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.LHA');
2093if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.DEB') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.DEB');
2094if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PET') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PET');
2095if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.PUP') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.PUP');
2096if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.RPM') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.RPM');
2097if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.SLP') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.SLP');
2098if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.LZH') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.LZH');
2099if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.DMG') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.DMG');
2100if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.HFS') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.HFS');
2101if RegKeyExists(HKCU, 'SOFTWARE\Classes\PeaZip.RAR') then RegDeleteKeyIncludingSubkeys(HKCU, 'SOFTWARE\Classes\PeaZip.RAR');
2102end;
2103
2104procedure contextseven;
2105var
2106  s,sfs,sall,smenuadd:ansistring;
2107  s3264:integer;
2108begin
2109      s:='';
2110      sfs:='';
2111      sall:='';
2112
2113      s:=s+'PeaZip.ext2browseasarchive; ';
2114      if cbcontextbrowse.state = cbChecked then s:=s+'PeaZip.ext2browsepath; ';
2115      if cbcontextadd2archive.state = cbChecked then s:=s+'PeaZip.add2separate; ';
2116      if cbcontextadd2archiveseparate.state = cbChecked then s:=s+'PeaZip.add2separatesingle; ';
2117      if cbcontextsfx.state = cbChecked then s:=s+'PeaZip.add2separatesfx; ';
2118      if cbcontext7zs.state = cbChecked then s:=s+'PeaZip.add2separate7z; ';
2119      if checkbox3f.state = cbChecked then s:=s+'PeaZip.add2separate7zfastest; ';
2120      if checkbox3.state = cbChecked then s:=s+'PeaZip.add2separate7zultra; ';
2121      if cbcontextzips.state = cbChecked then s:=s+'PeaZip.add2separatezip; ';
2122      if checkbox4.state = cbChecked then s:=s+'PeaZip.add2separatezipfastest; ';
2123      if cbcontext7zsenc.state = cbChecked then s:=s+'PeaZip.add2separate7zencrypt; ';
2124      if cbcontextzipmail.state = cbChecked then s:=s+'PeaZip.add2separatezipmail; ';
2125      if cbcontextsplit.state = cbChecked then s:=s+'PeaZip.add2split; ';
2126      if cbcontextconvert.state = cbChecked then s:=s+'PeaZip.add2convert; ';
2127
2128      if cbcontextadd2archive.state = cbChecked then smenuadd:='PeaZip.add2separate'
2129      else
2130         if cbcontextadd2archiveseparate.state = cbChecked then smenuadd:='PeaZip.add2separatesingle'
2131         else
2132            if cbcontextsfx.state = cbChecked then smenuadd:='PeaZip.add2separatesfx'
2133            else
2134               if cbcontext7zs.state = cbChecked then smenuadd:='PeaZip.add2separate7z'
2135               else
2136                  if checkbox3f.state = cbChecked then smenuadd:='PeaZip.add2separate7zfastest'
2137                  else
2138                     if checkbox3.state = cbChecked then smenuadd:='PeaZip.add2separate7zultra'
2139                     else
2140                        if cbcontextzips.state = cbChecked then smenuadd:='PeaZip.add2separatezip'
2141                        else
2142                           if checkbox4.state = cbChecked then smenuadd:='PeaZip.add2separatezipfastest'
2143                           else
2144                              if cbcontext7zsenc.state = cbChecked then smenuadd:='PeaZip.add2separate7zencrypt'
2145                              else
2146                                 if cbcontextzipmail.state = cbChecked then smenuadd:='PeaZip.add2separatezipmail'
2147                                 else
2148                                    if cbcontextsplit.state = cbChecked then smenuadd:='PeaZip.add2split'
2149                                    else
2150                                       if cbcontextconvert.state = cbChecked then smenuadd:='PeaZip.add2convert';
2151
2152      if cbcontextcrc.state = cbChecked then s:=s+'PeaZip.analyze; ';
2153      if cbcontextwipe.state = cbChecked then s:=s+'PeaZip.add2wipe; ';
2154
2155      sfs:='PeaZip.ext2main; '+s; //AllFileSystemObjects
2156
2157      if cbcontextext.state = cbChecked then sall:=sall+'PeaZip.ext2main; ';
2158      if cbcontextext2here.state = cbChecked then sall:=sall+'PeaZip.ext2here; ';
2159      if cbcontextext2smart.state = cbChecked then sall:=sall+'PeaZip.ext2smart; ';
2160      if cbcontextext2folder.state = cbChecked then sall:=sall+'PeaZip.ext2folder; ';
2161      if cbcontexttest.state = cbChecked then sall:=sall+'PeaZip.ext2test; ';
2162
2163      sall:=sall+s; //*
2164
2165      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\PeaZip', 'SubCommands', sall);
2166      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\PeaZip', 'MultiSelectModel', 'player');
2167      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\PeaZip', 'Icon', ExpandConstant('"{app}\peazip.exe",0'));
2168      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\PeaZip\command', '', ''); //workaround: in Windows 7 it is not needed a \command key for this type of entry, but some optimization/cleaning utilities (i.e. TuneUp) would otherwise delete all entries in \shell missing a \command key
2169      RegDeleteValue(sLMCU, 'SOFTWARE\Classes\*\shell\PeaZip\command', ''); //the key created for the workaround is emptied to default value, otherwise it may be detected as a defective link by some utilities
2170
2171      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip', 'SubCommands', sfs);
2172      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip', 'MultiSelectModel', 'player');
2173      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip', 'Icon', ExpandConstant('"{app}\peazip.exe",0'));
2174      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip\command', '', ''); //workaround: in Windows 7 it is not needed a \command key for this type of entry, but some optimization/cleaning utilities (i.e. TuneUp) would otherwise delete all entries in \shell missing a \command key
2175      RegDeleteValue(sLMCU, 'SOFTWARE\Classes\AllFileSystemObjects\shell\PeaZip\command', ''); //the key created for the workaround is emptied to default value, otherwise it may be detected as a defective link by some utilities
2176
2177      if IsWin64 then s3264:=HKLM64 else s3264:=HKLM32;
2178
2179        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate', '', '&Add to archive');
2180        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",2'));
2181        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi" "%1"'));
2182        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesingle', '', 'Add to separate archive(s)');
2183        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesingle', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",2'));
2184        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesingle\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multiseparate" "%1"'));
2185        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7z', '', 'Add to &7Z');
2186        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7z', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",10'));
2187        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7z\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7z" "%1"'));
2188        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest', '', 'Add to 7Z, fastest');
2189        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",10'));
2190        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zfastest" "%1"'));
2191        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7znormal', '', 'Add to 7Z, normal');
2192        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7znormal', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",10'));
2193        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7znormal\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7znormal" "%1"'));
2194        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest', '', 'Add to 7Z, fastest');
2195        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",10'));
2196        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zfastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zfastest" "%1"'));
2197        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zultra', '', 'Add to 7Z, ultra');
2198        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zultra', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",10'));
2199        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zultra\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zultra" "%1"'));
2200        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezip', '', 'Add to &ZIP');
2201        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezip', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",13'));
2202        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezip\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizip" "%1"'));
2203        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipfastest', '', 'Add to ZIP, fastest');
2204        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipfastest', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",13'));
2205        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipfastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipfastest" "%1"'));
2206        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipnormal', '', 'Add to ZIP, normal');
2207        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipnormal', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",13'));
2208        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipnormal\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipnormal" "%1"'));
2209        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipultra', '', 'Add to ZIP, ultra');
2210        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipultra', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",13'));
2211        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipultra\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipultra" "%1"'));
2212        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zencrypt', '', 'Encrypt (7Z)');
2213        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zencrypt', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",0'));
2214        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separate7zencrypt\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zencrypt" "%1"'));
2215        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipmail', '', 'Zip and mail');
2216        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipmail', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",3'));
2217        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatezipmail\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipmail" "%1"'));
2218        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesfx', '', 'Add to self-extracting archive');
2219        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesfx', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",11'));
2220        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2separatesfx\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multisfx" "%1"'));
2221        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browseasarchive', '', '&Open as archive');
2222        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browseasarchive', 'Icon', ExpandConstant('"{app}\peazip.exe",0'));
2223        RegWriteDWordValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browseasarchive', 'CommandFlags', 32);
2224        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browseasarchive\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2browseasarchive" "%1"'));
2225        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browsepath', '', '&Browse path with PeaZip');
2226        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browsepath', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",8'));
2227        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2browsepath\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2browsepath" "%1"'));
2228        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2split', '', 'Split file');
2229        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2split', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",5'));
2230        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2split\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multisplit" "%1"'));
2231        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2convert', '', 'Convert');
2232        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2convert', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",7'));
2233        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2convert\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multiconvert" "%1"'));
2234        RegWriteDWordValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\'+smenuadd, 'CommandFlags', 32);
2235        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2wipe', '', 'Secure delete');
2236        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2wipe', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",6'));
2237        RegWriteDWordValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2wipe', 'CommandFlags', 32);
2238        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.add2wipe\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2wipe" "%1"'));
2239        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2here', '', 'Extract &here');
2240        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2here', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",4'));
2241        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2here\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multihere" "%1"'));
2242        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2smart', '', 'Extract here (&smart new folder)');
2243        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2smart', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",4'));
2244        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2smart\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multismart" "%1"'));
2245        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2folder', '', 'Extract here (in &new folder)');
2246        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2folder', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",4'));
2247        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2folder\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multifolder" "%1"'));
2248        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2main', '', '&Extract...');
2249        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2main', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",4'));
2250        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2main\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multi" "%1"'));
2251        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2a', '', 'Extract archives');
2252        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2a', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",4'));
2253        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2a\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multi" "%1"'));
2254        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2test', '', 'Test archive(s)');
2255        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2test', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",1'));
2256        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.ext2test\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2test" "%1"'));
2257        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.analyze', '', 'CRC, hash and file tools');
2258        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.analyze', 'Icon', ExpandConstant('"{app}\res\icons\peazip_seven.icl",9'));
2259        RegWriteDWordValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.analyze', 'CommandFlags', 32);
2260        RegWriteStringValue(s3264, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\PeaZip.analyze\command', '', ExpandConstant('"{app}\res\PEA.EXE" "PEAUTILS" "12" "%1"'));
2261
2262end;
2263
2264procedure contextlegacy;
2265begin
2266
2267    if cbcontextadd2archive.state = cbChecked then
2268       begin
2269       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to archive\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi" "%1"'));
2270       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to archive', 'MultiSelectModel', 'player');
2271       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to archive', '', '&Add to archive');
2272       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to archive\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi" "%1"'));
2273       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to archive', 'MultiSelectModel', 'player');
2274       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to archive', '', '&Add to archive');
2275       end;
2276
2277    if cbcontext7zs.state = cbChecked then
2278       begin
2279       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7z" "%1"'));
2280       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z', 'MultiSelectModel', 'player');
2281       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z', '', 'Add to &7Z');
2282       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7z" "%1"'));
2283       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z', 'MultiSelectModel', 'player');
2284       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z', '', 'Add to &7Z');
2285       end;
2286    if CheckBox3.state = cbChecked then
2287       begin
2288       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, fastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zfastest" "%1"'));
2289       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, fastest', 'MultiSelectModel', 'player');
2290       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, fastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zfastest" "%1"'));
2291       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, fastest', 'MultiSelectModel', 'player');
2292       end;
2293    if CheckBox3.state = cbChecked then
2294       begin
2295       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, ultra\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zultra" "%1"'));
2296       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to 7Z, ultra', 'MultiSelectModel', 'player');
2297       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, ultra\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zultra" "%1"'));
2298       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to 7Z, ultra', 'MultiSelectModel', 'player');
2299       end;
2300    if cbcontextzips.state = cbChecked then
2301       begin
2302       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to ZIP\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizip" "%1"'));
2303       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to ZIP', 'MultiSelectModel', 'player');
2304       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to ZIP', '', 'Add to &ZIP');
2305       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizip" "%1"'));
2306       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP', 'MultiSelectModel', 'player');
2307       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP', '', 'Add to &ZIP');
2308       end;
2309    if CheckBox4.state = cbChecked then
2310       begin
2311       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to ZIP, fastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipfastest" "%1"'));
2312       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to ZIP, fastest', 'MultiSelectModel', 'player');
2313       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, fastest\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipfastest" "%1"'));
2314       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to ZIP, fastest', 'MultiSelectModel', 'player');
2315       end;
2316    if cbcontext7zsenc.state = cbChecked then
2317       begin
2318       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Encrypt (7Z)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zencrypt" "%1"'));
2319       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Encrypt (7Z)', 'MultiSelectModel', 'player');
2320       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Encrypt (7Z)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multi7zencrypt" "%1"'));
2321       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Encrypt (7Z)', 'MultiSelectModel', 'player');
2322       end;
2323    if cbcontextzipmail.state = cbChecked then
2324       begin
2325       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Zip and mail\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipmail" "%1"'));
2326       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Zip and mail', 'MultiSelectModel', 'player');
2327       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Zip and mail\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multizipmail" "%1"'));
2328       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Zip and mail', 'MultiSelectModel', 'player');
2329       end;
2330    if cbcontextsfx.state = cbChecked then
2331       begin
2332       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to self-extracting archive\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multisfx" "%1"'));
2333       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to self-extracting archive', 'MultiSelectModel', 'player');
2334       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to self-extracting archive\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multisfx" "%1"'));
2335       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to self-extracting archive', 'MultiSelectModel', 'player');
2336       end;
2337    if cbcontextadd2archiveseparate.state = cbChecked then
2338       begin
2339       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to separate archive(s)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multiseparate" "%1"'));
2340       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Add to separate archive(s)', 'MultiSelectModel', 'player');
2341       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to separate archive(s)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multiseparate" "%1"'));
2342       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Add to separate archive(s)', 'MultiSelectModel', 'player');
2343       end;
2344
2345       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Open as archive\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2openasarchive" "%1"'));
2346       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Open as archive', 'MultiSelectModel', 'player');
2347       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Open as archive', '', '&Open as archive');
2348
2349    if cbcontextbrowse.state = cbChecked then
2350       begin
2351       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Browse path with PeaZip\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2browsepath" "%1"'));
2352       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Browse path with PeaZip', 'MultiSelectModel', 'player');
2353       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Browse path with PeaZip', '', '&Browse path with PeaZip');
2354       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Browse path with PeaZip\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2browsepath" "%1"'));
2355       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Browse path with PeaZip', 'MultiSelectModel', 'player');
2356       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Browse path with PeaZip', '', '&Browse path with PeaZip');
2357       end;
2358
2359    if cbcontextcrc.state = cbChecked then
2360       begin
2361       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\CRC, hash and file tools\command', '', ExpandConstant('"{app}\res\PEA.EXE" "PEAUTILS" "12" "%1"'));
2362       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\CRC, hash and file tools', 'MultiSelectModel', 'single');
2363       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\CRC, hash and file tools\command', '', ExpandConstant('"{app}\res\PEA.EXE" "PEAUTILS" "12" "%1"'));
2364       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\CRC, hash and file tools', 'MultiSelectModel', 'single');
2365       end;
2366
2367    if cbcontextsplit.state = cbChecked then
2368       begin
2369       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Split file\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multisplit" "%1"'));
2370       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Split file', 'MultiSelectModel', 'player');
2371       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Split file\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multisplit" "%1"'));
2372       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Split file', 'MultiSelectModel', 'player');
2373       end;
2374    if cbcontextconvert.state = cbChecked then
2375       begin
2376       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Convert\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multiconvert" "%1"'));
2377       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Convert', 'MultiSelectModel', 'player');
2378       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Convert\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2multiconvert" "%1"'));
2379       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Convert', 'MultiSelectModel', 'player');
2380       end;
2381    if cbcontextwipe.state = cbChecked then
2382       begin
2383       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Secure delete\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2wipe" "%1"'));
2384       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Secure delete', 'MultiSelectModel', 'player');
2385       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Secure delete\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-add2wipe" "%1"'));
2386       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Secure delete', 'MultiSelectModel', 'player');
2387       end;
2388
2389    if cbcontextext2here.state = cbChecked then
2390       begin
2391       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract...\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multi" "%1"'));
2392       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract...', 'MultiSelectModel', 'player');
2393       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract...', '', '&Extract...');
2394       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Extract...\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multi" "%1"'));
2395       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Extract...', 'MultiSelectModel', 'player');
2396       RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\Directory\shell\Extract...', '', '&Extract...');
2397       end;
2398
2399    if cbcontextext2here.state = cbChecked then
2400       begin
2401          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multihere" "%1"'));
2402          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here', 'MultiSelectModel', 'player');
2403          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here', '', 'Extract &here');
2404       end;
2405    if cbcontextext2smart.state = cbChecked then
2406       begin
2407          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here (smart new folder)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multismart" "%1"'));
2408          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here (smart new folder)', 'MultiSelectModel', 'player');
2409          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here (smart new folder)', '', 'Extract here (&smart new folder)');
2410       end;
2411    if cbcontextext2folder.state = cbChecked then
2412       begin
2413          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here (in new folder)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2multifolder" "%1"'));
2414          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here (in new folder)', 'MultiSelectModel', 'player');
2415          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Extract here (in new folder)', '', 'Extract here (in &new folder)');
2416       end;
2417    if cbcontexttest.state = cbChecked then
2418       begin
2419          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Test archive(s)\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "-ext2test" "%1"'));
2420          RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\*\shell\Test archive(s)', 'MultiSelectModel', 'player');
2421       end;
2422end;
2423
2424procedure dolinks;
2425begin
2426    //link to PeaZip -add2archive: add to generic archive
2427    if cbfunadd.state = cbChecked then
2428      begin
2429  CreateShellLink(
2430  ExpandConstant('{sendto}\Add to archive.lnk'),
2431  'PeaZip archiver, add to archive',
2432  ExpandConstant('{app}\peazip.exe'),
2433  '-add2archive',
2434  '',
2435  ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2436  2,//icon index
2437  SW_SHOWNORMAL);
2438      end;
2439
2440    //link to PeaZip -add2convert: convert existing archives
2441    if cbfunconvert.state = cbChecked then
2442      begin
2443  CreateShellLink(
2444  ExpandConstant('{sendto}\Convert.lnk'),
2445  'PeaZip archiver, convert existing archive',
2446  ExpandConstant('{app}\peazip.exe'),
2447  '-add2convert',
2448  '',
2449  ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2450  7,//icon index
2451  SW_SHOWNORMAL);
2452      end;
2453
2454    //link to PeaZip -ext2here: extract here
2455    if cbfunext2here.state = cbChecked then
2456      begin
2457      CreateShellLink(
2458      ExpandConstant('{sendto}\Extract here.lnk'),
2459      'PeaZip archiver, extract here',
2460      ExpandConstant('{app}\peazip.exe'),
2461      '-ext2here',
2462      '',
2463      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2464      4,//icon index
2465      SW_SHOWNORMAL);
2466      end;
2467
2468    //link to PeaZip -ext2folder: extract here to new folder
2469    if cbfunext2folder.state = cbChecked then
2470      begin
2471      CreateShellLink(
2472      ExpandConstant('{sendto}\Extract here (in new folder).lnk'),
2473      'PeaZip archiver, extract here to new folder',
2474      ExpandConstant('{app}\peazip.exe'),
2475      '-ext2folder',
2476      '',
2477      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2478      4,//icon index
2479      SW_SHOWNORMAL);
2480      end;
2481
2482    //link to PeaZip -ext2main: extract with options
2483    if cbfunext2to.state = cbChecked then
2484      begin
2485      CreateShellLink(
2486      ExpandConstant('{sendto}\Extract....lnk'),
2487      'PeaZip archiver, extract into specified path',
2488      ExpandConstant('{app}\peazip.exe'),
2489      '-ext2main',
2490      '',
2491      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2492      4,//icon index
2493      SW_SHOWNORMAL);
2494      end;
2495
2496    //link to PeaZip -add27z: add to .7z archive
2497    if cbfun7z.state = cbChecked then
2498      begin
2499      CreateShellLink(
2500      ExpandConstant('{sendto}\Add to .7Z.lnk'),
2501      'PeaZip archiver, add to .7Z archive',
2502      ExpandConstant('{app}\peazip.exe'),
2503      '-add27z',
2504      '',
2505      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2506      10,//icon index
2507      SW_SHOWNORMAL);
2508      end;
2509
2510    //link to PeaZip -add27zmail: add to .7z archive and send by mail
2511    if cbfun7zmail.state = cbChecked then
2512      begin
2513      CreateShellLink(
2514      ExpandConstant('{sendto}\Add to .7Z and send by mail.lnk'),
2515      'PeaZip archiver, add to .7Z archive and send it by mail',
2516      ExpandConstant('{app}\peazip.exe'),
2517      '-add27zmail',
2518      '',
2519      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2520      3,//icon index
2521      SW_SHOWNORMAL);
2522      end;
2523
2524    //link to PeaZip -add2separate7z: add to separate .7z archives
2525    if cbfun7zs.state = cbChecked then
2526      begin
2527      CreateShellLink(
2528      ExpandConstant('{sendto}\Add to separate .7Z.lnk'),
2529      'PeaZip archiver, add to separate .7Z archives',
2530      ExpandConstant('{app}\peazip.exe'),
2531      '-add2separate7z',
2532      '',
2533      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2534      10,//icon index
2535      SW_SHOWNORMAL);
2536      end;
2537
2538    //link to PeaZip -add2zip: add to .zip archive
2539    if cbfunzip.state = cbChecked then
2540      begin
2541      CreateShellLink(
2542      ExpandConstant('{sendto}\Add to .ZIP.lnk'),
2543      'PeaZip archiver, add to .ZIP archive',
2544      ExpandConstant('{app}\peazip.exe'),
2545      '-add2zip',
2546      '',
2547      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2548      13,//icon index
2549      SW_SHOWNORMAL);
2550      end;
2551
2552    //link to PeaZip -add2zipmail: add to .zip archive and send by mail
2553    if cbfunzipmail.state = cbChecked then
2554      begin
2555      CreateShellLink(
2556      ExpandConstant('{sendto}\Add to .ZIP and send by mail.lnk'),
2557      'PeaZip archiver, add to .ZIP archive and send it by mail',
2558      ExpandConstant('{app}\peazip.exe'),
2559      '-add2zipmail',
2560      '',
2561      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2562      3,//icon index
2563      SW_SHOWNORMAL);
2564      end;
2565
2566    //link to PeaZip -add2separatezip: add to separate .zip archives
2567    if cbfunzips.state = cbChecked then
2568      begin
2569      CreateShellLink(
2570      ExpandConstant('{sendto}\Add to separate .ZIP.lnk'),
2571      'PeaZip archiver, add to separate .ZIP archives',
2572      ExpandConstant('{app}\peazip.exe'),
2573      '-add2separatezip',
2574      '',
2575      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2576      13,//icon index
2577      SW_SHOWNORMAL);
2578      end;
2579
2580    //link to PeaZip -add2sfx7z: add to sfx 7z archive
2581    if cbfunsfx.state = cbChecked then
2582      begin
2583      CreateShellLink(
2584      ExpandConstant('{sendto}\Add to self-extracting archive.lnk'),
2585      'PeaZip archiver, add to self extracting .7z archive',
2586      ExpandConstant('{app}\peazip.exe'),
2587      '-add2sfx7z',
2588      '',
2589      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2590      11,//icon index
2591      SW_SHOWNORMAL);
2592      end;
2593
2594    //link to PeaZip -add2sfx7zmail: add to sfx 7z archive and send by mail
2595    if cbfunsfxmail.state = cbChecked then
2596      begin
2597      CreateShellLink(
2598      ExpandConstant('{sendto}\Add to sfx and send by mail.lnk'),
2599      'PeaZip archiver, add to self extracting .7z archive and send it by mail',
2600      ExpandConstant('{app}\peazip.exe'),
2601      '-add2sfx7zmail',
2602      '',
2603      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2604      3,//icon index
2605      SW_SHOWNORMAL);
2606      end;
2607
2608    //link to PeaZip -add2crypt: add to encrypted .pea archive
2609    if cbfunencrypt.state = cbChecked then
2610      begin
2611      CreateShellLink(
2612      ExpandConstant('{sendto}\Encrypt (PEA).lnk'),
2613      'PeaZip archiver, add to encrypted .pea archive',
2614      ExpandConstant('{app}\peazip.exe'),
2615      '-add2crypt',
2616      '',
2617      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2618      0,//icon index
2619      SW_SHOWNORMAL);
2620      end;
2621
2622    //link to PeaZip -add2split: raw file split
2623    if cbfunsplit.state = cbChecked then
2624      begin
2625      CreateShellLink(
2626      ExpandConstant('{sendto}\Split file.lnk'),
2627      'PeaZip archiver, raw split single file',
2628      ExpandConstant('{app}\peazip.exe'),
2629      '-add2split',
2630      '',
2631      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2632      5,//icon index
2633      SW_SHOWNORMAL);
2634      end;
2635
2636    //link to PeaZip -add2wipe: Secure delete
2637    if cbfunwipe.state = cbChecked then
2638      begin
2639      CreateShellLink(
2640      ExpandConstant('{sendto}\Secure delete.lnk'),
2641      'PeaZip archiver, secure delete',
2642      ExpandConstant('{app}\peazip.exe'),
2643      '-add2wipe',
2644      '',
2645      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2646      6,//icon index
2647      SW_SHOWNORMAL);
2648      end;
2649
2650    //link to PeaZip -ext2test: test archive's content
2651    if cbfuntest.state = cbChecked then
2652      begin
2653      CreateShellLink(
2654      ExpandConstant('{sendto}\Test archive(s).lnk'),
2655      'PeaZip archiver, test archive(s)',
2656      ExpandConstant('{app}\peazip.exe'),
2657      '-ext2test',
2658      '',
2659      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2660      1,//icon index
2661      SW_SHOWNORMAL);
2662      end;
2663
2664    //link to PeaZip -ext2openasarchive
2665    if cbfunopen.state = cbChecked then
2666      begin
2667      CreateShellLink(
2668      ExpandConstant('{sendto}\Open as archive.lnk'),
2669      'PeaZip archiver, open as archive',
2670      ExpandConstant('{app}\peazip.exe'),
2671      '-ext2openasarchive',
2672      '',
2673      '',//ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2674      1,//icon index
2675      SW_SHOWNORMAL);
2676      end;
2677
2678    //link to PeaZip -ext2browsepath: browse path
2679    if CheckBoxbrowsepath.state = cbChecked then
2680      begin
2681      CreateShellLink(
2682      ExpandConstant('{sendto}\Browse path with PeaZip.lnk'),
2683      'PeaZip archiver, browse path',
2684      ExpandConstant('{app}\peazip.exe'),
2685      '-ext2browsepath',
2686      '',
2687      ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2688      8,//icon index
2689      SW_SHOWNORMAL);
2690      end;
2691
2692    //link to PeaZip -ext2commandprompt: open command prompt here
2693    if CheckBoxcommand.state = cbChecked then
2694      begin
2695      CreateShellLink(
2696      ExpandConstant('{sendto}\Open command prompt here.lnk'),
2697      'PeaZip archiver, open command prompt here',
2698      ExpandConstant('{app}\peazip.exe'),
2699      '-ext2commandprompt',
2700      '',
2701      '',//ExpandConstant('{app}\res\icons\peazip_seven.icl'),//icon filename
2702      1,//icon index
2703      SW_SHOWNORMAL);
2704      end;
2705end;
2706
2707procedure doassociations;
2708begin
2709
2710  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.pea', '', 'PeaZip.PEA');
2711  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PEA', '', 'PEA archive');
2712  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PEA\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2713  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PEA\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2714
2715  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.001', '', 'PeaZip.001');
2716  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.001', '', 'Split file');
2717  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.001\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_BLOCK.ICO,0'));
2718  RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.001\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2719
2720  if cbfullnone.state = cbUnchecked then
2721    begin
2722    //declare that filetype associations were created
2723    RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip', '', 'Created filetype associations');
2724    //7z/arc
2725    if cb7z.state = cbChecked then
2726      begin
2727      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\7Z', '', 'Associated PeaZip with file type(s)');
2728      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.7z', '', 'PeaZip.7Z');
2729      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.7Z', '', '7Z archive');
2730      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.7Z\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_7Z.ICO,0'));
2731      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.7Z\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2732      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.xz', '', 'PeaZip.XZ');
2733      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.XZ', '', 'XZ compressed file');
2734      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.XZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2735      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.XZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2736      end;
2737    //arc/wrc
2738    if cbarc.state = cbChecked then
2739      begin
2740      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\ARC', '', 'Associated PeaZip with file type(s)');
2741      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.arc', '', 'PeaZip.ARC');
2742      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ARC', '', 'FreeARC archive');
2743      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ARC\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2744      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ARC\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2745      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.wrc', '', 'PeaZip.WRC');
2746      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.WRC', '', 'FreeARC archive');
2747      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.WRC\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2748      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.WRC\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2749      end;
2750    //Brotli
2751    if cbbr.state = cbChecked then
2752      begin
2753      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\BR', '', 'Associated PeaZip with file type(s)');
2754      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.br', '', 'PeaZip.BR');
2755      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BR', '', 'Brotli compressed file');
2756      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BR\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2757      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BR\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2758      end;
2759    //Zstandard
2760    if cbzst.state = cbChecked then
2761      begin
2762      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\ZST', '', 'Associated PeaZip with file type(s)');
2763      //ZST
2764      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.zst', '', 'PeaZip.ZST');
2765      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZST', '', 'Zstandard compressed file');
2766      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZST\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2767      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZST\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2768      //TZST
2769      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.tzst', '', 'PeaZip.TZST');
2770      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TZST', '', 'Zstandard compressed TAR archive');
2771      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TZST\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2772      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TZST\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2773      end;
2774    //*PAQ group
2775    if cbpaq8.state = cbChecked then
2776      begin
2777      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\PAQ', '', 'Associated PeaZip with file type(s)');
2778      //LPAQ1
2779      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.lpaq1', '', 'PeaZip.LPAQ1');
2780      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ1', '', 'LPAQ1 compressed file');
2781      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ1\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2782      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ1\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2783      //LPAQ5
2784      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.lpaq5', '', 'PeaZip.LPAQ5');
2785      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ5', '', 'LPAQ5 compressed file');
2786      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ5\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2787      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ5\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2788      //LPAQ8
2789      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.lpaq8', '', 'PeaZip.LPAQ8');
2790      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ8', '', 'LPAQ8 compressed file');
2791      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ8\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2792      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LPAQ8\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2793      //PAQ8F
2794      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.paq8f', '', 'PeaZip.PAQ8F');
2795      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8F', '', 'PAQ8F archive');
2796      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8F\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2797      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8F\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2798      //PAQ8JD
2799      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.paq8jd', '', 'PeaZip.PAQ8JD');
2800      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8JD', '', 'PAQ8JD archive');
2801      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8JD\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2802      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8JD\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2803      //PAQ8L
2804      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.paq8l', '', 'PeaZip.PAQ8L');
2805      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8L', '', 'PAQ8L archive');
2806      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8L\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2807      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8L\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2808      //PAQ8O
2809      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.paq8o', '', 'PeaZip.PAQ8O');
2810      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8O', '', 'PAQ8O archive');
2811      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8O\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2812      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PAQ8O\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2813      //ZPAQ
2814      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.zpaq', '', 'PeaZip.ZPAQ');
2815      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZPAQ', '', 'ZPAQ archive');
2816      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZPAQ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2817      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZPAQ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2818      end;
2819    if cbquad.state = cbChecked then
2820      begin
2821      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\QUAD', '', 'Associated PeaZip with file type(s)');
2822      //QUAD
2823      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.quad', '', 'PeaZip.QUAD');
2824      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.QUAD', '', 'QUAD compressed file');
2825      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.QUAD\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2826      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.QUAD\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2827      //BALZ
2828      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.balz', '', 'PeaZip.BALZ');
2829      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BALZ', '', 'BALZ compressed file');
2830      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BALZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2831      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BALZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2832      //BCM
2833      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.bcm', '', 'PeaZip.BCM');
2834      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BCM', '', 'BCM compressed file');
2835      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BCM\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2836      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BCM\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2837      end;
2838    //Tar
2839    if cbtar.state = cbChecked then
2840      begin
2841      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\TAR', '', 'Associated PeaZip with file type(s)');
2842      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.tar', '', 'PeaZip.TAR');
2843      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TAR', '', 'TAR archive');
2844      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TAR\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2845      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TAR\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2846      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\GZ', '', 'Associated PeaZip with file type(s)');
2847      //GZ
2848      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.gz', '', 'PeaZip.GZ');
2849      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.GZ', '', 'GZip compressed file');
2850      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.GZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2851      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.GZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2852      //TGZ
2853      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.tgz', '', 'PeaZip.TGZ');
2854      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TGZ', '', 'GZip compressed TAR archive');
2855      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TGZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2856      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TGZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2857      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\BZ2', '', 'Associated PeaZip with file type(s)');
2858      //BZ
2859      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.bz', '', 'PeaZip.BZ');
2860      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BZ', '', 'BZip2 compressed file');
2861      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2862      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2863      //BZ2
2864      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.bz2', '', 'PeaZip.BZ2');
2865      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BZ2', '', 'BZip2 compressed file');
2866      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BZ2\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2867      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.BZ2\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2868      //TBZ
2869      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.tbz', '', 'PeaZip.TBZ');
2870      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TBZ', '', 'BZip2 compressed TAR archive');
2871      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TBZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2872      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TBZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2873      //TBZ2
2874      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.tbz2', '', 'PeaZip.TBZ2');
2875      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TBZ2', '', 'BZip2 compressed TAR archive');
2876      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TBZ2\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2877      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TBZ2\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2878      end;
2879    //Zip
2880    if cbzip.state = cbChecked then
2881      begin
2882      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\ZIP', '', 'Associated PeaZip with file type(s)');
2883      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.zip', '', 'PeaZip.ZIP');
2884      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZIP', '', 'ZIP archive');
2885      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZIP\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_ZIP.ICO,0'));
2886      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZIP\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2887      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip\ZIPX', '', 'Associated PeaZip with file type(s)');
2888      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.zipx', '', 'PeaZip.ZIPX');
2889      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZIPX', '', 'ZIPX archive');
2890      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZIPX\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_ZIP.ICO,0'));
2891      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ZIPX\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2892      end;
2893    end;
2894  if cbreadnone.state = cbUnchecked then
2895    begin //associate types with browse/extract only support
2896    //declare that additional filetype associations were created
2897    RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional', '', 'Created additional filetype associations');
2898    //ACE
2899    if cbace.state = cbChecked then
2900      begin
2901      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\ACE', '', 'Associated PeaZip with file type(s)');
2902      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.ACE', '', 'PeaZip.ACE');
2903      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ACE', '', 'ACE archive');
2904      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ACE\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2905      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ACE\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2906      end;
2907    //ARJ
2908    if cbarj.state = cbChecked then
2909      begin
2910      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\ARJ', '', 'Associated PeaZip with file type(s)');
2911      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.ARJ', '', 'PeaZip.ARJ');
2912      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ARJ', '', 'ARJ archive');
2913      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ARJ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2914      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ARJ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2915      end;
2916    //CAB
2917    if cbcab.state = cbChecked then
2918      begin
2919      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\CAB', '', 'Associated PeaZip with file type(s)');
2920      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.CAB', '', 'PeaZip.CAB');
2921      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.CAB', '', 'CAB archive');
2922      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.CAB\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2923      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.CAB\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2924      end;
2925    //CPIO
2926    if cbcpio.state = cbChecked then
2927      begin
2928      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\CPIO', '', 'Associated PeaZip with file type(s)');
2929      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.CPIO', '', 'PeaZip.CPIO');
2930      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.CPIO', '', 'CPIO archive');
2931      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.CPIO\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2932      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.CPIO\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2933      //Z
2934      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.Z', '', 'PeaZip.Z');
2935      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.Z', '', 'Z compressed file');
2936      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.Z\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2937      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.Z\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2938      //TZ
2939      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.tz', '', 'PeaZip.TZ');
2940      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TZ', '', 'Z compressed TAR archive');
2941      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2942      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2943      //TZ
2944      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.taz', '', 'PeaZip.TAZ');
2945      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TAZ', '', 'Z compressed TAR archive');
2946      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TAZ\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2947      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.TAZ\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2948      end;
2949    //Disk images
2950    if cbiso.state = cbChecked then
2951      begin
2952      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\ISO', '', 'Associated PeaZip with file type(s)');
2953      //ISO
2954      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.ISO', '', 'PeaZip.ISO');
2955      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ISO', '', 'ISO disk image');
2956      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ISO\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_CD.ICO,0'));
2957      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.ISO\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2958      //UDF
2959      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.UDF', '', 'PeaZip.UDF');
2960      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.UDF', '', 'UDF disk image');
2961      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.UDF\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_CD.ICO,0'));
2962      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.UDF\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2963      end;
2964    //LHA
2965    if cblha.state = cbChecked then
2966      begin
2967      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\LHA', '', 'Associated PeaZip with file type(s)');
2968      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.LHA', '', 'PeaZip.LHA');
2969      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LHA', '', 'LHA archive');
2970      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LHA\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
2971      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LHA\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2972      end;
2973    //Linux packages (DEB, RPM, PET/PUP)
2974    if cblinux.state = cbChecked then
2975      begin
2976      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\linux', '', 'Associated PeaZip with file type(s)');
2977      //DEB
2978      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.DEB', '', 'PeaZip.DEB');
2979      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.DEB', '', 'DEB package');
2980      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.DEB\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
2981      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.DEB\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2982      //PET
2983      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.PET', '', 'PeaZip.PET');
2984      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PET', '', 'PET package (Puppy Linux)');
2985      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PET\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
2986      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PET\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2987      //PUP
2988      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.PUP', '', 'PeaZip.PUP');
2989      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PUP', '', 'PUP package (Puppy Linux)');
2990      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PUP\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
2991      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.PUP\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2992      //RPM
2993      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.RPM', '', 'PeaZip.RPM');
2994      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.RPM', '', 'RPM package');
2995      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.RPM\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
2996      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.RPM\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
2997      //SLP
2998      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.SLP', '', 'PeaZip.SLP');
2999      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.SLP', '', 'SLP package');
3000      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.SLP\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
3001      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.SLP\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
3002      end;
3003    //LZH
3004    if cblzh.state = cbChecked then
3005      begin
3006      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\LZH', '', 'Associated PeaZip with file type(s)');
3007      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.LZH', '', 'PeaZip.LZH');
3008      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LZH', '', 'LZH archive');
3009      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LZH\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP.ICO,0'));
3010      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.LZH\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
3011      end;
3012    //Mac formats (DMG, HFS)
3013    if cbMac.state = cbChecked then
3014      begin
3015      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\mac', '', 'Associated PeaZip with file type(s)');
3016      //DMG
3017      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.DMG', '', 'PeaZip.DMG');
3018      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.DMG', '', 'DMG package');
3019      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.DMG\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
3020      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.DMG\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
3021      //UDF
3022      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.HFS', '', 'PeaZip.HFS');
3023      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.HFS', '', 'UDF package');
3024      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.HFS\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_PACKAGE.ICO,0'));
3025      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.HFS\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
3026      end;
3027    //RAR
3028    if cbrar.state = cbChecked then
3029      begin
3030      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\SOFTWARE\PeaZip_additional\RAR', '', 'Associated PeaZip with file type(s)');
3031      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\.RAR', '', 'PeaZip.RAR');
3032      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.RAR', '', 'RAR archive');
3033      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.RAR\DefaultIcon', '', ExpandConstant('{app}\RES\ICONS\PEAZIP_RAR.ICO,0'));
3034      RegWriteStringValue(sLMCU, 'SOFTWARE\Classes\PeaZip.RAR\shell\open\command', '', ExpandConstant('"{app}\PEAZIP.EXE" "%1"'));
3035      end;
3036    end;
3037end;
3038
3039function NextButtonClick(CurPageID: Integer): Boolean;
3040var
3041  ResultCode: Integer;
3042  ErrorCode: Integer;
3043begin
3044
3045if CurPageID = wpReady then
3046  begin
3047
3048  if cbinstallcu.Checked = False then sLMCU:=HKLM
3049  else sLMCU:=HKCU;
3050
3051  if (radiobuttoninstall4.Checked = False) then //only for installers
3052    begin
3053    clearcontextlegacy;
3054    clearcontextseven;
3055    clearlinks;
3056    clearassociations;
3057    BringToFrontAndRestore();
3058
3059  if (radiobuttoninstall3.Checked = False) then
3060    begin
3061    //context menu
3062    if cbcontextnone.state = cbUnchecked then
3063       if (GetWindowsVersion >= $06010000) then
3064          if cbcascaded.state = cbChecked then contextseven
3065          else contextlegacy
3066       else contextlegacy;
3067    //sendto menu
3068    if cbfunnone.state = cbUnchecked then dolinks;
3069    //associations
3070    doassociations;
3071  end;
3072
3073  end;
3074
3075  try
3076  if cbreset.checked=true then
3077     if (GetWindowsVersion >= $06000000) then ShellExecAsOriginalUser('', ExpandConstant('{app}\peazip.exe'), '-peaziptotalreset', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
3078  except end;
3079
3080  BringToFrontAndRestore();
3081  end;
3082Result := True;
3083end;
3084
3085procedure dolanguage;
3086var
3087  ErrorCode: Integer;
3088  slang:string;
3089begin
3090case combobox1.itemindex of
3091 0: slang:='ar.txt';
3092 1: slang:='bg.txt';
3093 2: slang:='by-cr.txt';
3094 3: slang:='by-lt.txt';
3095 4: slang:='chs.txt';
3096 5: slang:='cht.txt';
3097 6: slang:='cz.txt';
3098 7: slang:='de-uml.txt';
3099 8: slang:='de-uml-alt.txt';
3100 9: slang:='*nochange';//do not change
3101 10: slang:='en.txt';
3102 11: slang:='en-gb.txt';
3103 12: slang:='es-es.txt';
3104 13: slang:='es-la.txt';
3105 14: slang:='eu.txt';
3106 15: slang:='fi.txt';
3107 16: slang:='fr.txt';
3108 17: slang:='gl.txt';
3109 18: slang:='gr.txt';
3110 19: slang:='hu.txt';
3111 20: slang:='id.txt';
3112 21: slang:='it.txt';
3113 22: slang:='ja.txt';
3114 23: slang:='ko.txt';
3115 24: slang:='nl.txt';
3116 25: slang:='no.txt';
3117 26: slang:='pl.txt';
3118 27: slang:='pt-br.txt';
3119 28: slang:='pt-pt.txt';
3120 29: slang:='ro.txt';
3121 30: slang:='ru.txt';
3122 31: slang:='si.txt';
3123 32: slang:='sk.txt';
3124 33: slang:='sl.txt';
3125 34: slang:='sv.txt';
3126 35: slang:='tj.txt';
3127 36: slang:='tr.txt';
3128 37: slang:='uk.txt';
3129 38: slang:='uz.txt';
3130 39: slang:='vn.txt';
3131 else slang:='';
3132end;
3133if slang<>'' then
3134   if (GetWindowsVersion >= $06000000) then ShellExec('', ExpandConstant('{app}\peazip.exe'), '-peaziplanguage '+slang, '', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
3135end;
3136
3137procedure CurStepChanged(CurStep: TSetupStep);
3138begin
3139if CurStep=ssPostInstall then
3140   begin
3141   dolanguage;
3142   end;
3143end;
3144
3145procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
3146begin
3147if CurUninstallStep = usDone then
3148  begin
3149  clearlinks; //delete links
3150  clearcontextlegacy;
3151  clearcontextseven; //delete context menu items
3152  clearassociations; //don't delete classes root values, as recommended by guidelines for managing file associations
3153  BringToFrontAndRestore();
3154  end;
3155end;