; Script generated by the Inno Setup Script Wizard.
  ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  
  [Setup]
  PrivilegesRequired=poweruser
  AppName=HTML-Editor
  AppVerName=HtRed 3.1
  AppPublisher=J. Rathlev
  AppPublisherURL=http://www.rathlev-home.de/?tools/othertools.html
  AppSupportURL=http://www.rathlev-home.de/?tools/othertools.html
  AppUpdatesURL=http://www.rathlev-home.de/?tools/othertools.html
  DefaultDirName={pf}\HTML-Editor
  DefaultGroupName=HTML-Editor
  AllowNoIcons=yes
  LicenseFile=E:\Delphi7\Projekte\HTML\Dokumentation\license.txt
  OutputDir=E:\Delphi7\Projekte\HtRed\Distribution
  OutputBaseFilename=htred-setup
  SetupIconFile=E:\Delphi7\Projekte\HTML\HtRed.ico
  Compression=lzma
  SolidCompression=yes
  
  [Languages]
  Name: "en"; MessagesFile: "compiler:Default.isl"
  Name: "de"; MessagesFile: "compiler:Languages\German.isl"
  
  [CustomMessages]
  en.FileAssoc=File associations:
  de.FileAssoc=Dateizuordnungen:
  en.DescContext="Edit" HTML with HtRed in context menu
  de.DescContext=HTML mit HtRed "bearbeiten" im Kontext-MenĂ¼
  en.EditContext=&Edit using HtRed ..
  de.EditContext=&Mit HtRed bearbeiten ..
  
  [Tasks]
  Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce
  Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  Name: "fileassoc"; Description: "{cm:DescContext}"; GroupDescription: "{cm:FileAssoc}"; Flags: unchecked
  
  [Registry]
  Root: HKCR; Subkey: "{code:GetHtmlKey}\shell\Edit with HtRed"; ValueType: string; ValueName: ""; ValueData: "{cm:EditContext}"; Tasks: fileassoc; Flags: uninsdeletekey
  Root: HKCR; Subkey: "{code:GetHtmlKey}\shell\Edit with HtRed\command"; ValueType: string; ValueName: ""; ValueData: """{app}\HtRed.exe"" ""%1"""; Tasks: fileassoc; Flags: uninsdeletekey
  
  [Files]
  Source: "E:\Delphi7\Bin\Html\htred.exe"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Bin\Html\htred-PHP.hlt"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Bin\Html\html-codes.txt"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Bin\Html\htred-CSS.hlt"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Bin\Html\htred-HTML.hlt"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Bin\Html\htred-JS.hlt"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Projekte\HtRed\Dokumentation\htr-help.chm"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Projekte\HtRed\Dokumentation\license.txt"; DestDir: "{app}"; Flags: ignoreversion
  Source: "E:\Delphi7\Projekte\HtRed\Dokumentation\update.txt"; DestDir: "{app}"; Flags: ignoreversion
  ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  
  [Icons]
  Name: "{group}\HTML-Editor"; Filename: "{app}\htred.exe"
  Name: "{group}\{cm:UninstallProgram,HTML-Editor}"; Filename: "{uninstallexe}"
  Name: "{commondesktop}\HTML-Editor"; Filename: "{app}\htred.exe"; Tasks: desktopicon
  Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\HTML-Editor"; Filename: "{app}\htred.exe"; Tasks: quicklaunchicon
  
  [Run]
  Filename: "{app}\htred.exe"; Description: "{cm:LaunchProgram,HTML-Editor}"; Flags: nowait postinstall skipifsilent
  
  [Code]
  function GetHtmlKey (Param: String) : String;
  var
    HtmlApp : String;
  begin
    if not RegQueryStringValue(HKEY_CLASSES_ROOT, '.html', '', HtmlApp) then begin
      HtmlApp:='HtRed';
      RegWriteStringValue(HKEY_CLASSES_ROOT, '.html', '', HtmlApp);
      end;
    Result:=HtmlApp;
  end;