mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
536 lines
23 KiB
Plaintext
536 lines
23 KiB
Plaintext
|
||
#if !defined(ASSC_APP_NAME)
|
||
# define ASSC_APP_NAME 'ONLYOFFICE'
|
||
#endif
|
||
|
||
#if !defined(ASCC_REG_PREFIX)
|
||
# define ASCC_REG_PREFIX 'ASC'
|
||
#endif
|
||
|
||
#if !defined(ASCC_REG_REGISTERED_APP_NAME)
|
||
# define ASCC_REG_REGISTERED_APP_NAME 'ONLYOFFICE Editors'
|
||
#endif
|
||
|
||
#if !defined(ASSOC_PROG_ID)
|
||
# define ASSOC_PROG_ID 'ASC.Editors'
|
||
#endif
|
||
|
||
#if !defined(ASSOC_APP_FRIENDLY_NAME)
|
||
# define ASSOC_APP_FRIENDLY_NAME 'ONLYOFFICE Editors'
|
||
#endif
|
||
|
||
[Setup]
|
||
ChangesAssociations=true
|
||
|
||
|
||
[CustomMessages]
|
||
|
||
en.AssociateDescription =Associate office document file types with {#ASSC_APP_NAME}
|
||
pt_BR.AssociateDescription =Associe tipos de arquivos de documento office com {#ASSC_APP_NAME}
|
||
cs.AssociateDescription =Přiřadit typy souborů kancelářských dokumentů {#ASSC_APP_NAME}
|
||
sk.AssociateDescription =Priradiť typy súborov kancelárskych dokumentov {#ASSC_APP_NAME}
|
||
ru.AssociateDescription =Ассоциировать типы файлов офисных документов с {#ASSC_APP_NAME}
|
||
de.AssociateDescription =Verknüpfung von Office-Dokumenten mit {#ASSC_APP_NAME}
|
||
fr.AssociateDescription =Associer les fichiers office avec {#ASSC_APP_NAME}
|
||
es.AssociateDescription =Asociar tipos de archivos de documentos de oficina con {#ASSC_APP_NAME}
|
||
it_IT.AssociateDescription =Associare i tipi di file video/audio ad {#ASSC_APP_NAME}
|
||
|
||
en.AssociateCaption =File Associations
|
||
pt_BR.AssociateCaption =Associações de arquivos
|
||
cs.AssociateCaption =Asociace souboru
|
||
sk.AssociateCaption =Asociácia súboru
|
||
ru.AssociateCaption =Ассоциации файлов
|
||
de.AssociateCaption =Dateiassoziationen
|
||
fr.AssociateCaption =Associations de fichiers
|
||
es.AssociateCaption =Asociaciones de archivos
|
||
it_IT.AssociateCaption =Associazioni dei file
|
||
|
||
en.AssociateDont =Do not associate
|
||
pt_BR.AssociateDont =Não associar
|
||
cs.AssociateDont =Neasociováno
|
||
sk.AssociateDont =Neasociované
|
||
ru.AssociateDont =Не ассоциировать
|
||
de.AssociateDont =Nicht assoziieren
|
||
fr.AssociateDont =Ne pas associer
|
||
es.AssociateDont =No asociar
|
||
it_IT.AssociateDont =Non associare
|
||
|
||
en.AssociateAll =Associate all
|
||
pt_BR.AssociateAll =Associar todos
|
||
cs.AssociateAll =Asociovat vše
|
||
sk.AssociateAll =Asociovať všetko
|
||
ru.AssociateAll =Ассоциировать все
|
||
de.AssociateAll =Alle assoziieren
|
||
fr.AssociateAll =Associer tous
|
||
es.AssociateAll =Asociar todo
|
||
it_IT.AssociateAll =Associare tutto
|
||
|
||
en.AssociateSel =Associate selected
|
||
pt_BR.AssociateSel =Associar selecionados
|
||
cs.AssociateSel =Vybraná asociace
|
||
sk.AssociateSel =Vybraná asociácia
|
||
ru.AssociateSel =Ассоциировать выбранные
|
||
de.AssociateSel =Ausgewählte assoziieren
|
||
fr.AssociateSel =Associer sélectionnés
|
||
es.AssociateSel =Asociar seleccionado
|
||
it_IT.AssociateSel =Associare selezione
|
||
|
||
en.AssociateAudio =File types
|
||
pt_BR.AssociateAudio =Tipos de arquivo
|
||
cs.AssociateAudio =Typy souborů
|
||
sk.AssociateAudio =Typy súborov
|
||
ru.AssociateAudio =Типы файлов
|
||
de.AssociateAudio =Dateitypen
|
||
fr.AssociateAudio =Types de fichiers
|
||
es.AssociateAudio =Tipos de archivos
|
||
it_IT.AssociateAudio =Tipi di file
|
||
|
||
en.extMSWord =Microsoft Word Document
|
||
pt_BR.extMSWord =Documento Microsoft Word
|
||
cs.extMSWord =Microsoft Word Dokument
|
||
sk.extMSWord =Microsoft Word Dokument
|
||
ru.extMSWord =Документ Microsoft Word
|
||
de.extMSWord =Microsoft Word Dokument
|
||
fr.extMSWord =Document Microsoft Word
|
||
es.extMSWord =Documento de Microsoft Word
|
||
it_IT.extMSWord =Documento di Microsoft Word
|
||
|
||
en.extMSExcel =Microsoft Excel Workbook
|
||
pt_BR.extMSExcel =Planilha Microsoft Excel
|
||
cs.extMSExcel =Microsoft Excel Sešit
|
||
sk.extMSExcel =Microsoft Excel Zošit
|
||
ru.extMSExcel =Книга Microsoft Excel
|
||
de.extMSExcel =Microsoft Excel Arbeitsmappe
|
||
fr.extMSExcel =Classeur Microsoft Excel
|
||
es.extMSExcel =Libro de Microsoft Excel
|
||
it_IT.extMSExcel =Libro di Microsoft Excel
|
||
|
||
en.extMSPresentation =Microsoft PowerPoint Presentation
|
||
pt_BR.extMSPresentation =Apresentação Microsoft PowerPoint
|
||
cs.extMSPresentation =Microsoft PowerPoint Prezentace
|
||
sk.extMSPresentation =Microsoft PowerPoint Prezentácia
|
||
ru.extMSPresentation =Презентация Microsoft PowerPoint
|
||
de.extMSPresentation =Microsoft PowerPoint Präsentation
|
||
fr.extMSPresentation =Présentation Microsoft PowerPoint
|
||
es.extMSPresentation =Presentación de Microsoft PowerPoint
|
||
it_IT.extMSPresentation =Presentazione di Microsoft PowerPoint
|
||
|
||
en.extMSSlideshow =Microsoft PowerPoint Slideshow
|
||
pt_BR.extMSSlideshow =Apresentações do PowerPoint da Microsoft
|
||
cs.extMSSlideshow =Microsoft PowerPoint Slideshow
|
||
sk.extMSSlideshow =Microsoft PowerPoint Slideshow
|
||
ru.extMSSlideshow =Слайдшоу Microsoft PowerPoint
|
||
de.extMSSlideshow =Microsoft PowerPoint Slideshow
|
||
fr.extMSSlideshow =Diaporama Microsoft PowerPoint
|
||
es.extMSSlideshow =Presentación de Microsoft PowerPoint
|
||
it_IT.extMSSlideshow =Microsoft PowerPoint Slideshow
|
||
|
||
en.extODT =OpenDocument Text Document
|
||
pt_BR.extODT =Documento de Texto do OpenDocument
|
||
cs.extODT =Dokumenty OpenDocument
|
||
sk.extODT =Dokumenty OpenDocument
|
||
ru.extODT =Текстовый документ OpenDocument
|
||
de.extODT =OpenDocument Textdokument
|
||
fr.extODT =Document OpenDocument Texte
|
||
es.extODT =Documento de texto de OpenDocument
|
||
it_IT.extODT =Documento di testo di OpenDocument
|
||
|
||
en.extODS =OpenDocument Spreadsheet
|
||
pt_BR.extODS =Planilha do OpenDocument
|
||
cs.extODS =Sešit OpenDocument
|
||
sk.extODS =Zošit OpenDocument
|
||
ru.extODS =Электронная таблица OpenDocument
|
||
de.extODS =OpenDocument Tabelle
|
||
fr.extODS =Classeur OpenDocument
|
||
es.extODS =Hoja de cálculo de OpenDocument
|
||
it_IT.extODS =OpenDocument Spreadsheet
|
||
|
||
en.extODP =OpenDocument Presentation
|
||
pt_BR.extODP =Apresentação do OpenDocument
|
||
cs.extODP =Prezentace OpenDocument
|
||
sk.extODP =Prezentácia OpenDocument
|
||
ru.extODP =Презентация OpenDocument
|
||
de.extODP =OpenDocument Präsentation
|
||
fr.extODP =Présentation OpenDocument
|
||
es.extODP =Presentación de OpenDocument
|
||
it_IT.extODP =Presentazione di OpenDocument
|
||
|
||
en.defprogAppDescription=Free desktop office suite for document editing and collaboration
|
||
pt_BR.defprogAppDescription=Pacote office para desktop gratuito para edição e colaboração em documentos
|
||
cs.defprogAppDescription=Free desktop office suite for document editing and collaboration
|
||
sk.defprogAppDescription=Free desktop office suite for document editing and collaboration
|
||
ru.defprogAppDescription=Бесплатный десктопный офисный пакет для редактирования документов и совместной работы
|
||
de.defprogAppDescription=Kostenlose Desktop-Office-Suite für Dokumentenbearbeitung und Zusammenarbeit
|
||
fr.defprogAppDescription=Suite bureautique d'applications de bureau gratuite pour l'édition de documents et la collaboration
|
||
es.defprogAppDescription=Paquete desktop de oficina gratuito para edición de documentos y colaboración
|
||
it_IT.defprogAppDescription=Suite gratuita per l'ufficio desktop per la modifica e la collaborazione in tempo reale di documenti
|
||
|
||
en.warnWin10FileAssociationDesc=To associate the files with the application, open the following window after the installation is complete:
|
||
pt_BR.warnWin10FileAssociationDesc=Para associar os arquivos com o aplicativo, abra a seguinte janela após a instalação estar completa:
|
||
cs.warnWin10FileAssociationDesc=Pro připojení souborů k aplikaci, otevřete následující okno po dokončení aplikace:
|
||
sk.warnWin10FileAssociationDesc=Ak chcete súbory priradiť k aplikácii, po dokončení inštalácie otvorte nasledujúce okno:
|
||
ru.warnWin10FileAssociationDesc=Чтобы ассоциировать файлы с приложением, откройте следующее окно после того, как установка будет завершена:
|
||
de.warnWin10FileAssociationDesc=Nachdem die Installation abgeschlossen ist, öffnen Sie das folgende Feld, um die Dateien mit der Anwendung zu verknüpfen:
|
||
fr.warnWin10FileAssociationDesc=Pour associer les fichiers avec le logiciel après son installation, ouvre la fenêtre suivante:
|
||
es.warnWin10FileAssociationDesc=Para asociar los archivos con la aplicación, abra la siguiente ventana una vez finalizada la instalación:
|
||
it_IT.warnWin10FileAssociationDesc=Per associare i file all’applicazione, apri la seguente finestra al termine dell’installazione:
|
||
|
||
en.warnWin10FileAssociationPath=Settings > Apps > Default apps
|
||
pt_BR.warnWin10FileAssociationPath=Configurações > Aplicativos > Aplicativos padrão
|
||
cs.warnWin10FileAssociationPath=Nastavení > Aplikace > Výchozí aplikace
|
||
sk.warnWin10FileAssociationPath=Nastavenia> Aplikácie> Predvolené aplikácie
|
||
ru.warnWin10FileAssociationPath=Настройки > Приложения > Приложения по умолчанию
|
||
de.warnWin10FileAssociationPath=Einstellungen > Apps > Standard-Apps
|
||
fr.warnWin10FileAssociationPath=Paramètres > Apps > Logiciels par défaut
|
||
es.warnWin10FileAssociationPath=Ajustes > Aplicaciones > Aplicaciones predeterminadas
|
||
it_IT.warnWin10FileAssociationPath=Impostazioni > Apps > App predefinite
|
||
|
||
en.runOpenDefaultApps=Open Default apps
|
||
pt_BR.runOpenDefaultApps=Open Default apps
|
||
cs.runOpenDefaultApps=Open Default apps
|
||
sk.runOpenDefaultApps=Open Default apps
|
||
ru.runOpenDefaultApps=Открыть Приложения по умолчанию
|
||
de.runOpenDefaultApps=Open Default apps
|
||
fr.runOpenDefaultApps=Open Default apps
|
||
es.runOpenDefaultApps=Open Default apps
|
||
it_IT.runOpenDefaultApps=Open Default apps
|
||
|
||
[Run]
|
||
Filename: control.exe; Description: {cm:runOpenDefaultApps}; Parameters: /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=DesktopEditors; \
|
||
Flags:postinstall shellexec nowait unchecked; MinVersion: 10.0.10240;
|
||
|
||
[Registry]
|
||
Root: HKLM; Subkey: Software\Classes\{#ASSOC_PROG_ID}; Flags: uninsdeletekey
|
||
Root: HKLM; Subkey: Software\Classes\{#ASSOC_PROG_ID}; ValueType: string; ValueName:; ValueData: {#ASSOC_APP_FRIENDLY_NAME};
|
||
Root: HKLM; Subkey: Software\Classes\{#ASSOC_PROG_ID}\DefaultIcon; ValueType: string; ValueName:; ValueData: "{app}\{#iconsExe},0";
|
||
Root: HKLM; Subkey: Software\Classes\{#ASSOC_PROG_ID}\shell\open\command; ValueType: string; ValueName:; ValueData: """{app}\{#iconsExe}"" ""%1""";
|
||
Root: HKLM; Subkey: Software\Classes\{#ASSOC_PROG_ID}\shell\open; ValueType: string; ValueName: FriendlyAppName; ValueData: {#ASSOC_APP_FRIENDLY_NAME};
|
||
|
||
[Code]
|
||
|
||
var
|
||
OnAudioClick: Boolean;
|
||
ChlbAudio: TNewCheckListBox;
|
||
AudioExtEnabled: Array of Boolean;
|
||
AudioExts: Array of String;
|
||
ExtensionRegistryInfo: array of string;
|
||
AChecked: Boolean;
|
||
associatePage: TWizardPage;
|
||
|
||
procedure Explode(var Dest: TArrayOfString; Text: String; Separator: String);
|
||
var
|
||
i, p: Integer;
|
||
begin
|
||
i := 0;
|
||
repeat
|
||
SetArrayLength(Dest, i+1);
|
||
p := Pos(Separator,Text);
|
||
if p > 0 then begin
|
||
Dest[i] := Copy(Text, 1, p-1);
|
||
Text := Copy(Text, p + Length(Separator), Length(Text));
|
||
i := i + 1;
|
||
end else begin
|
||
Dest[i] := Text;
|
||
Text := '';
|
||
end;
|
||
until Length(Text)=0;
|
||
end;
|
||
|
||
procedure initExtensions;
|
||
var
|
||
prefix: string;
|
||
begin
|
||
SetArrayLength(AudioExts, 16);
|
||
SetArrayLength(AudioExtEnabled, GetArrayLength(AudioExts));
|
||
|
||
AudioExts[0] := 'DOC';
|
||
AudioExts[1] := 'DOCX';
|
||
AudioExts[2] := 'XLS';
|
||
AudioExts[3] := 'XLSX';
|
||
AudioExts[4] := 'PPT';
|
||
AudioExts[5] := 'PPTX';
|
||
AudioExts[6] := 'PPS';
|
||
AudioExts[7] := 'PPSX';
|
||
AudioExts[8] := 'ODT';
|
||
AudioExts[9] := 'ODS';
|
||
AudioExts[10] := 'ODP';
|
||
AudioExts[11] := 'RTF';
|
||
// AudioExts[12] := 'TXT';
|
||
AudioExts[12] := 'CSV';
|
||
AudioExts[13] := 'PDF';
|
||
AudioExts[14] := 'DJVU';
|
||
AudioExts[15] := 'XPS';
|
||
|
||
SetArrayLength(ExtensionRegistryInfo, GetArrayLength(AudioExts));
|
||
|
||
prefix := '{#ASCC_REG_PREFIX}' + '.';
|
||
|
||
ExtensionRegistryInfo[0] := prefix + 'Document.1:' + ExpandConstant('{cm:extMSWord}') + ':' + '11';
|
||
ExtensionRegistryInfo[1] := prefix + 'Document.12:' + ExpandConstant('{cm:extMSWord}') + ':' + '7';
|
||
ExtensionRegistryInfo[2] := prefix + 'Sheet.1:' + ExpandConstant('{cm:extMSExcel}') + ':' + '16';
|
||
ExtensionRegistryInfo[3] := prefix + 'Sheet.12:' + ExpandConstant('{cm:extMSExcel}') + ':' + '10';
|
||
ExtensionRegistryInfo[4] := prefix + 'Show.1:' + ExpandConstant('{cm:extMSPresentation}') + ':' + '1';
|
||
ExtensionRegistryInfo[5] := prefix + 'Show.12:' + ExpandConstant('{cm:extMSPresentation}') + ':' + '9';
|
||
ExtensionRegistryInfo[6] := prefix + 'SlideShow.1:' + ExpandConstant('{cm:extMSSlideshow}') + ':' + '2';
|
||
ExtensionRegistryInfo[7] := prefix + 'SlideShow.12:' + ExpandConstant('{cm:extMSSlideshow}') + ':' + '8';
|
||
ExtensionRegistryInfo[8] := prefix + 'Document.2:' + ExpandConstant('{cm:extODT}') + ':' + '12';
|
||
ExtensionRegistryInfo[9] := prefix + 'Sheet.2:' + ExpandConstant('{cm:extODS}') + ':' + '17';
|
||
ExtensionRegistryInfo[10] := prefix + 'Show.2:' + ExpandConstant('{cm:extODP}') + ':' + '3';
|
||
ExtensionRegistryInfo[11] := prefix + 'Rtf:' + ':' + '13';
|
||
//ExtensionRegistryInfo[12] := prefix + 'Txt:' + ':' + '14';
|
||
ExtensionRegistryInfo[12] := prefix + 'Csv:' + ':' + '18';
|
||
ExtensionRegistryInfo[13] := prefix + 'Pdf:' + ':' + '5';
|
||
ExtensionRegistryInfo[14] := prefix + 'DjVu:' + ':' + '4';
|
||
ExtensionRegistryInfo[15] := prefix + 'Xps:' + ':' + '6';
|
||
end;
|
||
|
||
procedure ChlbAudioClickCheck(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
begin
|
||
if not OnAudioClick then
|
||
begin
|
||
OnAudioClick := True;
|
||
if ChlbAudio.Checked[2] then
|
||
begin
|
||
if not AChecked then
|
||
begin
|
||
AChecked := True;
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||
begin
|
||
ChlbAudio.ItemEnabled[i + 3] := True;
|
||
ChlbAudio.Checked[i + 3] := AudioExtEnabled[i];
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||
AudioExtEnabled[i] := ChlbAudio.Checked[i + 3];
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
AChecked := False;
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||
begin
|
||
ChlbAudio.ItemEnabled[i + 3] := False;
|
||
// ChlbAudio.Checked[i + 3] := ArrAudio[i];
|
||
end;
|
||
end;
|
||
OnAudioClick := False;
|
||
ChlbAudio.Repaint;
|
||
end;
|
||
end;
|
||
|
||
procedure InitializeAssociatePage;
|
||
var
|
||
lblAudio: TLabel;
|
||
i: Integer;
|
||
version: TWindowsVersion;
|
||
createPage: Boolean;
|
||
paramSkip: string;
|
||
|
||
labelDesc, labelPath: TNewStaticText;
|
||
begin
|
||
initExtensions();
|
||
|
||
ChlbAudio := nil;
|
||
createPage := False;
|
||
if not WizardSilent then begin
|
||
paramSkip := GetCommandlineParam('/skip');
|
||
if (not Length(paramSkip) > 0) or (paramSkip <> 'associates') then begin
|
||
createPage := True
|
||
end
|
||
end;
|
||
|
||
if createPage then begin
|
||
associatePage := CreateCustomPage(wpSelectTasks, CustomMessage('AssociateCaption'), CustomMessage('AssociateDescription'));
|
||
|
||
GetWindowsVersionEx(version);
|
||
if version.Major < 10 then begin
|
||
lblAudio := TLabel.Create(associatePage);
|
||
lblAudio.Parent := associatePage.Surface;
|
||
lblAudio.WordWrap := True;
|
||
lblAudio.Caption := ExpandConstant('{cm:AssociateAudio}');
|
||
lblAudio.AutoSize := True;
|
||
lblAudio.Width := associatePage.SurfaceWidth;
|
||
lblAudio.Left := 0;
|
||
lblAudio.Top := 0;
|
||
|
||
ChlbAudio := TNewCheckListBox.Create(associatePage);
|
||
ChlbAudio.Parent := associatePage.Surface;
|
||
ChlbAudio.Left := 0;
|
||
ChlbAudio.Top := lblAudio.Top + lblAudio.Height + 4;
|
||
ChlbAudio.Width := associatePage.SurfaceWidth;
|
||
ChlbAudio.Height := associatePage.SurfaceHeight - ChlbAudio.Top - 4 - 3;
|
||
|
||
ChlbAudio.AddRadioButton(ExpandConstant('{cm:AssociateDont}'), '', 0, False, True, nil);
|
||
ChlbAudio.AddRadioButton(ExpandConstant('{cm:AssociateAll}'), '', 0, False, True, nil);
|
||
ChlbAudio.AddRadioButton(ExpandConstant('{cm:AssociateSel}'), '', 0, True, True, nil);
|
||
|
||
AChecked := True;
|
||
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||
begin
|
||
ChlbAudio.AddCheckBox(AudioExts[i], '', 1, False, True, False, False, nil);
|
||
AudioExtEnabled[i] := True;
|
||
end;
|
||
|
||
OnAudioClick := False;
|
||
ChlbAudio.OnClickCheck := @ChlbAudioClickCheck;
|
||
|
||
ChlbAudio.Checked[1] := True;
|
||
ChlbAudioClickCheck(ChlbAudio);
|
||
end else begin
|
||
labelDesc := TNewStaticText.Create(associatePage);
|
||
labelDesc.Parent := associatePage.Surface;
|
||
labelDesc.WordWrap := True;
|
||
labelDesc.Caption := ExpandConstant('{cm:warnWin10FileAssociationDesc}');
|
||
labelDesc.AutoSize := True;
|
||
labelDesc.Width := associatePage.SurfaceWidth;
|
||
labelDesc.Left := 0;
|
||
labelDesc.Top := 0;
|
||
|
||
labelPath := TNewStaticText.Create(associatePage);
|
||
labelPath.Parent := associatePage.Surface;
|
||
labelPath.WordWrap := True;
|
||
labelPath.Caption := ExpandConstant('{cm:warnWin10FileAssociationPath}');
|
||
labelPath.AutoSize := True;
|
||
labelPath.Width := associatePage.SurfaceWidth;
|
||
labelPath.Left := 0;
|
||
labelPath.Top := labelDesc.Top + 50;
|
||
labelPath.Font.Style := [fsBold];
|
||
end
|
||
end else begin
|
||
associatePage := nil
|
||
end;
|
||
|
||
//vc_desctopiconshow := True;
|
||
//WizardForm.TasksList.OnClickCheck := @OnTasksListClickCheck;
|
||
end;
|
||
|
||
//----------
|
||
|
||
function isAssociateExtension(index: Integer): Boolean;
|
||
begin
|
||
if ChlbAudio = nil then
|
||
Result := False
|
||
else
|
||
Result := ChlbAudio.Checked[1] or (ChlbAudio.Checked[2] and ChlbAudio.Checked[index + 3]);
|
||
end;
|
||
|
||
//----------
|
||
|
||
procedure AddToDefaultPrograms;
|
||
var
|
||
i: integer;
|
||
argsArray: TArrayOfString;
|
||
begin
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, '{#APP_REG_PATH}\Capabilities', 'ApplicationDescription', ExpandConstant('{cm:defprogAppDescription}'));
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, '{#APP_REG_PATH}\Capabilities', 'ApplicationIcon', ExpandConstant('"{app}\{#NAME_EXE_OUT},0"'));
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, '{#APP_REG_PATH}\Capabilities', 'ApplicationName', '{#sAppName}');
|
||
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do begin
|
||
Explode(argsArray, ExtensionRegistryInfo[i],':');
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, '{#APP_REG_PATH}\Capabilities\FileAssociations', '.' + LowerCase(AudioExts[i]), argsArray[0]);
|
||
end;
|
||
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\RegisteredApplications', '{#ASCC_REG_REGISTERED_APP_NAME}', '{#APP_REG_PATH}\Capabilities');
|
||
end;
|
||
|
||
procedure DoPostInstall();
|
||
var
|
||
i: Integer;
|
||
ext, progId1, progId2: string;
|
||
argsArray: TArrayOfString;
|
||
begin
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||
begin
|
||
Explode(argsArray, ExtensionRegistryInfo[i],':');
|
||
|
||
// checking existance is temporary locked to rewrite new icons indexes
|
||
//if not RegKeyExists(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0]) then begin
|
||
if Length(argsArray[1]) <> 0 then
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0], '', argsArray[1]);
|
||
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0] + '\DefaultIcon', '', ExpandConstant('{app}\{#iconsExe},' + argsArray[2]));
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0] + '\shell\open\command', '', ExpandConstant('"{app}\{#iconsExe}" "%1"'));
|
||
//end;
|
||
|
||
ext := LowerCase(AudioExts[i]);
|
||
|
||
if (associatePage <> nil) and isAssociateExtension(i) then
|
||
begin
|
||
if not RegValueExists(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext, '') then begin
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext, '', argsArray[0])
|
||
end else
|
||
RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext, '', progId1);
|
||
|
||
if not RegValueExists(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext + '\OpenWithProgids', argsArray[0]) then
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext + '\OpenWithProgids', argsArray[0], '');
|
||
|
||
if RegValueExists(HKEY_CURRENT_USER, 'Software\Classes\.' + ext, '') then
|
||
RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Classes\.' + ext, '', progId2);
|
||
|
||
if ((Length(progId2) <> 0) and (CompareText(progId2, argsArray[0]) <> 0)) or
|
||
((Length(progId1) <> 0) and (CompareText(progId1, argsArray[0]) <> 0)) then
|
||
begin
|
||
RegDeleteKeyIncludingSubkeys(HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.' + ext + '\UserChoice');
|
||
RegWriteStringValue(HKEY_CURRENT_USER, 'Software\Classes\.' + ext, '', argsArray[0])
|
||
//RegWriteStringValue(HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.' + ext + '\UserChoice', 'Progid', argsArray[0]);
|
||
end;
|
||
end else
|
||
begin
|
||
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext + '\OpenWithProgids', argsArray[0], '');
|
||
end;
|
||
end;
|
||
|
||
AddToDefaultPrograms;
|
||
end;
|
||
|
||
{
|
||
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
|
||
begin
|
||
MsgBox(MemoDirInfo, mbInformation, MB_OK);
|
||
Result:=MemoUserInfoInfo + NewLine + MemoDirInfo + NewLine + MemoTypeInfo + NewLine + MemoComponentsInfo + NewLine + MemoGroupInfo + NewLine + MemoTasksInfo;
|
||
end;
|
||
}
|
||
|
||
procedure UnassociateExtensions;
|
||
var
|
||
i: Integer;
|
||
argsArray: TArrayOfString;
|
||
ext, str: string;
|
||
begin
|
||
initExtensions();
|
||
|
||
for i := 0 to GetArrayLength(AudioExts) - 1 do
|
||
begin
|
||
Explode(argsArray, ExtensionRegistryInfo[i],':');
|
||
RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, 'Software\Classes\' + argsArray[0]);
|
||
|
||
ext := LowerCase(AudioExts[i]);
|
||
RegDeleteValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext + '\OpenWithProgids', argsArray[0]);
|
||
RegDeleteValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext + '\OpenWithProgids', ExpandConstant('{#ASSOC_PROG_ID}'));
|
||
|
||
RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext, '', str);
|
||
if CompareText(str, argsArray[0]) = 0 then
|
||
RegDeleteValue(HKEY_LOCAL_MACHINE, 'Software\Classes\.' + ext, '');
|
||
|
||
RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Classes\.' + ext, '', str);
|
||
if CompareText(str, argsArray[0]) = 0 then
|
||
RegDeleteValue(HKEY_CURRENT_USER, 'Software\Classes\.' + ext, '');
|
||
|
||
RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.' + ext + '\UserChoice', 'Progid', str);
|
||
if CompareText(str, argsArray[0]) = 0 then
|
||
RegDeleteKeyIncludingSubkeys(HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.' + ext + '\UserChoice');
|
||
|
||
//RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, ExpandConstant('Software\Classes\Applications\{#NAME_EXE_OUT})'));
|
||
RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, ExpandConstant('Software\Classes\.' + ext + '\OpenWithList\{#NAME_EXE_OUT}'));
|
||
end;
|
||
|
||
RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, '{#APP_REG_PATH}\Capabilities');
|
||
RegDeleteValue(HKEY_LOCAL_MACHINE, 'Software\RegisteredApplications', '{#ASCC_REG_REGISTERED_APP_NAME}');
|
||
RegDeleteValue(HKEY_CLASSES_ROOT, 'Local Settings\Software\Microsoft\Windows\Shell\MuiCache', ExpandConstant('{app}\{#iconsExe}'));
|
||
end;
|