Here is a detailed description about template management observed with UE for Windows v18.00.0.1029 in an upgrade scenario from UE v17.30 (or any other previous version).
By default there is no template file
UETMPLTE.DAT created by any UltraEdit version prior v18.00 as long as the user has not defined templates in the
Display/Modify Templates dialog.
If the user has defined one or more templates (max. 50 prior v18.00), UltraEdit has created an
UETMPLTE.DAT file in the directory of uedit32.ini, see
UltraEdit INI file location. I use in the description below the synonym
IniDir for this directory.
It was possible and is still possible to specify at
Advanced - Configuration - Directories a different
Template directory for the template file(s). Of course the user should have write permissions on this directory or modifying of the templates is not possible and automatic upgrade as described below fails too. I use in the description below the synonym
TplDir for this directory.
On start of UltraEdit after upgrading following is done by uedit32.exe regarding template file(s) management:
- UltraEdit checks if in IniDir a subdirectory named templates exist. If this is not the case as on first start after an upgrade, UltraEdit creates this subdirectory. It does not matter if a TplDir is configured, the templates directory is always created in IniDir. It remains empty if a TplDir is configured.
- Next UE looks in TplDir or if not configured in IniDir for a file with name UETMPLTE.DAT. If such a file is present, it converts the templates stored in binary format in this file to XML format and saves the templates with file name UETMPLTE.TPL in TplDir or in directory IniDir\templates.
The file UETMPLTE.TPL contains the global templates. There is no limit anymore.
The template file in binary format is kept unmodified for scenarios like a shared IniDir or TplDir used by multiple UltraEdit users not upgrading all at the same time, or for the case that the user upgrades to UE v18.00 without having a valid license for testing new version and later decides to uninstall UE v18.00 and reinstall the licensed previous version. UETMPLTE.DAT can be deleted manually if a downgrade to an UE version prior v18.00 will surely never take place.
- Independent of the conversion and creation of a global template file, UltraEdit creates next in IniDir\templates or in TplDir a subdirectory named environment.
In this directory 6 *.tp1 files are created for the 6 standard environments if there are no *.te1 files present in IniDir from an UltraEdit version prior v18.00. The files are empty files for the environments Notepad Replacement, Power User and Programmer because no standard templates are defined for these environments.
UltraEdit converts existing *.te1 environment template files in IniDir to *.tp1 files into the environments templates directory in an upgrade scenario. The existing *.te1 environment template files remain in IniDir for the same reason as UETMPLTE.DAT is not deleted automatically after conversion. The *.te1 files can be deleted manually in IniDir if a downgrade to an UE version prior v18.00 will surely never take place.
- Further UE creates another subdirectory named language in IniDir\templates or in TplDir and copies to this directory the 13 *-tpl.xml files for the 13 standard syntax highlighting languages installed with UltraEdit into directory template\language in program files directory of UltraEdit. All of them contain predefined templates.
After this upgrade is done once, the user can modify the global, environment and language templates as wanted with adding also templates for self-created environments or self-added syntax highlighting languages.
So if there are no templates after upgrade although you had defined templates in a previous version of UltraEdit, you either use a different user account as before upgrade, or UltraEdit could not create the subdirectories and files in
TplDir because of missing permissions.