// Extra Tasks

  PushTagsandRegisters;

  IfFileExists("%b\Config\PDFAutoDetect.edt",>
    !`ReadFile("%b\Config\PDFAutoDetect.edt",0);>
      ReadFile("%B\Config\Upgrade\PDFAutoDetect_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\PDFAutoDetect_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Config\PDFAutoDetect.edt","%!0");`);

  IfFileExists("%b\Exec\Erase Working Files.edt",>
    !`ReadFile("%b\Exec\Erase Working Files.edt",0);>
      ReadFile("%B\Config\Upgrade\Erase Working Files_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\Erase Working Files_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\Erase Working Files.edt","%!0");`);

  IfFileExists("%b\Exec\ExeCompiler.edt",>
    !`ReadFile("%b\Exec\ExeCompiler.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeCompiler_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompiler_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeCompiler_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompiler_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\ExeCompiler.edt","%!0");`);

  IfFileExists("%b\Exec\ExeCompilerPre.edt",>
    !`ReadFile("%b\Exec\ExeCompilerPre.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_old3.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_new3.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_old4.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPre_new4.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\ExeCompilerPre.edt","%!0");`);

  IfFileExists("%b\Exec\ExeCompilerPost.edt",>
    !`ReadFile("%b\Exec\ExeCompilerPost.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPost_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPost_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPost_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPost_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPost_old3.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeCompilerPost_new3.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\ExeCompilerPost.edt","%!0");`);

  IfFileExists("%b\Exec\TeX\BibTeXify.edt",>
    !`ReadFile("%b\Exec\TeX\BibTeXify.edt",0);>
      ReadFile("%B\Config\Upgrade\BibTeXify_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\BibTeXify_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\BibTeXify_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\BibTeXify_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX\BibTeXify.edt","%!0");`);

  IfFileExists("%b\Exec\TeX\PDFTeXify.edt",>
    !`ReadFile("%b\Exec\TeX\PDFTeXify.edt",0);>
      ReadFile("%B\Config\Upgrade\PDFTeXify_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\PDFTeXify_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\PDFTeXify_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\PDFTeXify_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX\PDFTeXify.edt","%!0");`);

  IfFileExists("%b\Exec\TeX\TeXify.edt",>
    !`ReadFile("%b\Exec\TeX\TeXify.edt",0);>
      ReadFile("%B\Config\Upgrade\TeXify_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\TeXify_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\TeXify_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\TeXify_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\TeXify_old3.dat",4);>
      ReadFile("%B\Config\Upgrade\TeXify_new3.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX\TeXify.edt","%!0");`);

  IfFileExists("%b\Exec\TeX\Compile.edt",>
    !`ReadFile("%b\Exec\TeX\Compile.edt",0);>
      FindInString("%!0","Requires(\(0*\));",-11,-11,11);>
      IfStr("%#0","20170103","<",>
        !"CopyFile('%b\Exec\TeX\Compile.edt',>
           '%b\Exec\TeX\Compile.bak');>
          DeleteFile('%b\Exec\TeX\Compile.edt');");`);

  IfFileExists("%b\Exec\TeX\Compile.edt",>
    !`ReadFile("%b\Exec\TeX\Compile.edt",0);>
      ReadFile("%B\Config\Upgrade\Compile_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\Compile_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\Compile_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\Compile_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX\Compile.edt","%!0");`);

  IfFileExists("%b\Exec\TeX\Compile Selected.edt",>
    !`ReadFile("%b\Exec\TeX\Compile Selected.edt",0);>
      FindInString("%!0","Requires(\(0*\));",-11,-11,11);>
      IfStr("%#0","20170103","<",>
        !"CopyFile('%b\Exec\TeX\Compile Selected.edt',>
           '%b\Exec\TeX\Compile Selected.bak');>
          DeleteFile('%b\Exec\TeX\Compile Selected.edt');");`);

  IfFileExists("%b\Exec\MiKTeX\ExecModes.edt",>
    !`ReadFile("%b\Exec\MiKTeX\ExecModes.edt",0);>
      ReadFile("%B\Config\Upgrade\ExecModes_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\ExecModes_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExecModes_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\ExecModes_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\MiKTeX\ExecModes.edt","%!0");`);

  IfFileExists("%b\Exec\MiKTeX\ExeMode_Default.edt",>
    !`ReadFile("%b\Exec\MiKTeX\ExeMode_Default.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeMode_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeMode_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\ExeMode_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeMode_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\MiKTeX\ExeMode_Default.edt","%!0");`);

  IfFileExists("%b\Exec\MiKTeX\ExeMode.edt",>
    !`ReadFile("%b\Exec\MiKTeX\ExeMode.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeMode_new1.dat",5);>
      SubstituteInString("%!0",>
        '<@{ }Assign(!"TeXify-Executable", !\|texify\.exe\|);>'+>
        '*>@{ }Assign(!"TeXify-Parameters"*>',>
        "%!5",11);>
      ReadFile("%B\Config\Upgrade\ExeMode_new2.dat",5);>
      SubstituteInString("%!0",>
        '<@{ }Assign(!"PDFTeXify-Executable", !\|texify\.exe\|);>'+>
        '*>@{ }Assign(!"PDFTeXify-Parameters"*>',>
        "%!5",11);>
      WriteFile("%b\Exec\MiKTeX\ExeMode.edt","%!0");`);

  IfFileExists("%b\Exec\TeX Live\ExecModes.edt",>
    !`ReadFile("%b\Exec\TeX Live\ExecModes.edt",0);>
      ReadFile("%B\Config\Upgrade\ExecModes_old3.dat",4);>
      ReadFile("%B\Config\Upgrade\ExecModes_new3.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX Live\ExecModes.edt","%!0");`);

  IfFileExists("%b\Exec\TeX Live\ExeMode_Default.edt",>
    !`ReadFile("%b\Exec\TeX Live\ExeMode_Default.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeMode_old3.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeMode_new3.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX Live\ExeMode_Default.edt","%!0");`);

  IfFileExists("%b\Exec\TeX Live\ExeMode.edt",>
    !`ReadFile("%b\Exec\TeX Live\ExeMode.edt",0);>
      ReadFile("%B\Config\Upgrade\ExeMode_old3.dat",4);>
      ReadFile("%B\Config\Upgrade\ExeMode_new3.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Exec\TeX Live\ExeMode.edt","%!0");`);

  IfFileExists("%b\Macros\Events\MDIActivate.edt",>
    !`ReadFile("%b\Macros\Events\MDIActivate.edt",0);>
      ReadFile("%B\Config\Upgrade\MDIActivate_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\MDIActivate_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Macros\Events\MDIActivate.edt","%!0");`);

  IfFileExists("%b\Macros\RegEx\isVerbatim.edt",>
    !`ReadFile("%b\Macros\RegEx\isVerbatim.edt",0);>
      ReadFile("%B\Config\Upgrade\isVerbatim_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\isVerbatim_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\isVerbatim_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\isVerbatim_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\Macros\RegEx\isVerbatim.edt","%!0");`);

  IfFileExists("%b\ConfigEx\Input.ini",>
    !`ReadFile("%b\ConfigEx\Input.ini",0);>
      ReadFile("%B\Config\Upgrade\Verbatim_Input_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\Verbatim_Input_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\Verbatim_Input_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\Verbatim_Input_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Input.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Keywords.ini",>
    !`ReadFile("%b\ConfigEx\Keywords.ini",0);>
      ReadFile("%B\Config\Upgrade\Verbatim_Keywords_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\Verbatim_Keywords_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Keywords.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Colors.ini",>
    !`ReadFile("%b\ConfigEx\Colors.ini",0);>
      ReadFile("%B\Config\Upgrade\EasyGrayTheme_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\EasyGrayTheme_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Colors.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbar.ini",>
    !`ReadFile("%b\ConfigEx\Toolbar.ini",0);>
      ReadFile("%B\Config\Upgrade\Default_Toolbar_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\Default_Toolbar_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbar.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar1c.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar1c.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar1c.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar1d.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar1d.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar1d.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar1l.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar1l.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar1l.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar1s.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar1s.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar1s.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar2c.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar2c.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar2c.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar2l.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar2l.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar2l.ini","%!0");`);

  IfFileExists("%b\ConfigEx\Toolbars\Toolbar2s.ini",>
    !`ReadFile("%b\ConfigEx\Toolbars\Toolbar2s.ini",0);>
      ReadFile("%B\Config\Upgrade\Toolbar_old6.dat",4);>
      ReadFile("%B\Config\Upgrade\Toolbar_new6.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      WriteFile("%b\ConfigEx\Toolbars\Toolbar2s.ini","%!0");`);

  IfFileExists("%b\ConfigEx\MainMenu.ini",>
    !`ReadFile("%b\ConfigEx\MainMenu.ini",0);>
      ReadFile("%B\Config\Upgrade\GreekMenu_old1.dat",4);>
      ReadFile("%B\Config\Upgrade\GreekMenu_new1.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      ReadFile("%B\Config\Upgrade\GreekMenu_old2.dat",4);>
      ReadFile("%B\Config\Upgrade\GreekMenu_new2.dat",5);>
      SubstituteInString("%!0","%!4","%!5",10);>
      SubstituteInString("%!0",!"%F=%P",!"%F==%P",10);>
      WriteFile("%b\ConfigEx\MainMenu.ini","%!0");`);

  PopTagsandRegisters;

End;
