File association & representation

File association & representation

2
NewbieNewbie
2

    Nov 19, 2023#1

    Hello everyone,

    How can I set the standard links such as TXT etc.?

    There is only opened the Windows 11 settings window Apps – Default apps after opening in UltraEdit Settings and clicking in the tree pane on File associations and next on button System File Association. But the UltraEdit program does not appear anywhere on the list to set as default. Setting each individual link like TXT individually will probably not be the solution.

    The size of the fonts, symbols, menus, etc. simply do not fit together. That looks so ugly.I made the symbols bigger with Large buttons like the font size and also in the registry under the key [HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics].

    I have Windows 11 22H2 and the resolution is 3440x1440 with a Windows scaling of 150% and the text size is 114% in the Windows settings.
    Certain things like the ruler above are tiny compared to other things.It doesn't match whether symbols or even the fonts in the boxes, tabs.It looks different everywhere, in terms of size.

    Since I've been using other well-known editors for many years, I thought I'd take another look at how UltraEdit has developed.
    Since my first license with UltraEdit is from the year 2000 in April.

    Greetings,

    Angel

    6,685587
    Grand MasterGrand Master
    6,685587

      Nov 19, 2023#2

      How can I set the standard links such as TXT?

      Clicking in UltraEdit on Advanced - Settings or Configuration - File associations and clicking next on button System File Associations opens the Windows 11 Settings window Apps > Default apps. There must be typed in the edit field below Set a default for a file type or link type the file extension like .txt. There is displayed a button bar with either Choose a default on no application currently associated with that file type or the name of the associated application like Notepad. Next a click on this button bar must be made for opening the window Select a default app for .txt files or whatever file extension was entered before. In the list should be UltraEdit Professional Text/Hex Editor because of UltraEdit registers itself on first start by a user under registry key HKEY_CURRENT_USER\Software\Classes\Applications with its executable file name. Double click on UltraEdit Professional Text/Hex Editor or single click on this list item and click on button Set default. That actions must be done for each file type on which a double click on a file with the entered file extension should result in starting UltraEdit and opening the double clicked file for viewing or editing it.

      UltraEdit is not in the applications list below Set defaults for applications because of neither the installer of UltraEdit nor UltraEdit itself add capabilities registry keys for UltraEdit for informing Windows with which file types UltraEdit can be associated for opening the appropriate files. UltraEdit can be used for viewing and editing hundreds or even thousands of different file types as it is a general text editor with hex editing capabilities too.

      Open a command prompt window and run the following two commands:

      Code: Select all

      reg QUERY HKEY_CURRENT_USER\Software\RegisteredApplications
      reg QUERY HKEY_LOCAL_MACHINE\Software\RegisteredApplications
      There is output the list of applications which were explicitly registered by their installers with adding a registry value of type REG_SZ with the string value being the registry key with the file associations for the application.

      For example, the following two commands list the capabilities of Microsoft Edge and Windows Notepad on Windows 11 23H2 (OS Build 22631.2715):

      Code: Select all

      reg QUERY "HKLM\Software\Clients\StartMenuInternet\Microsoft Edge\Capabilities" /s
      reg QUERY "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.WindowsNotepad_11.2309.28.0_x64__8wekyb3d8bbwe\App\Capabilities" /s
      UltraEdit is not designed for specific file types like Microsoft Office applications or Internet browsers or compression/decompression tools like WinRAR or 7-Zip. Most of the file extensions people associate perhaps with UltraEdit are associated by default already with several other applications. The file extension .txt is associated with Notepad. The file extensions .bat and .cmd are associated with Windows Command Processor (Windows built-in and not explicitly registered as usual as an exception from the standard) because of a double click on such files should result in execution of the batch file and not in opening the batch file in a text editor. The file extension .ps1 is associated with Notepad although most Windows users using often PowerShell scripts change usually that file association for getting the script file interpreted by PowerShell on double click and not for opening the script file in Windows Notepad. The file extension .py is associated with Python for running the Python script and not for editing it in a text editor.

      Windows Notepad offers being the default application for the file extensions: .inf .ini .ps1 .psd1 .psm1 .scp .log .wtx .txt

      UltraEdit can be configured for being the application to start for opening files of one of these file extensions. But it can be expected that most of the UltraEdit users have their own expectations and preferences which file types should be associated with UltraEdit. I could bet that if UltraEdit or its installer would register a list of file extensions and UltraEdit users would make use of this list without checking each file extension separately, none of the UltraEdit users would be finally happy.

      Representation of UltraEdit on screens with a very high resolution

      UltraEdit as of currently latest version 2023.1.0.23 is a QHD/UHD aware application. The symbols for the ribbon or menus/toolbars as well as the application icons are in the UltraEdit resources in the dimensions 16x16, 24x24, 32x32, 40x40, 48x48, 64x64, 96x96, 128x128, 256x256. UltraEdit tries to select automatically the symbols suitable for the screen resolution. However, the selected dimension can be nevertheless not good if the user bought a laptop or a monitor with a resolution which is far too high for the physical dimensions of the display and for the eyes of the user.

      The UltraEdit users can customize the font and font size for the document window area of opened files by clicking
      • in ribbon mode on ribbon tab View in first group Display on first item Fonts and next in the popup menu on the menu items Set font and Set hex / column font;
      • in toolbar/menu mode with contemporary menus in menu View in first submenu Fonts on the menu items Set font and Set hex / column font;
      • in toolbar/menu mode with traditional menus in menu View on the menu items Set font and Set Hex/column mode font.
      The font for the normal editing mode can be also a proportional font with an individual width of each character. The font for column mode editing and for hex mode editing must be a non-proportional (fixed width) font. The font should be a fixed pitch font on using also the font styles bold and italic on which all characters in all font styles have the same width. It is also possible configuring a font for normal editing mode depending on file extension.

      All other fonts used inside the client area of the main application window can be customized by the user in the Manage Themes dialog window on the tabs Application and Output or with editing the configuration file (font for the file tabs). Manage Themes is opened by clicking
      • in ribbon mode on ribbon tab Layout in first group Look and feel on second item Themes;
      • in toolbar/menu mode with contemporary menus in menu Layout in third submenu Themes on the first menu item Manage themes;
      • in toolbar/menu mode with traditional menus in menu View in second submenu Themes on the first menu item Manage themes.
      The font size of the ruler depends on the font size used for the text display of a file in the document window area as the vertical lines and column numbers must fit with the character width of the displayed and edited text. The ruler is more or less useless on using in normal editing mode a proportional font with variable character widths and should be better toggled off. The column number in status bar is better with such user configuration.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Nov 19, 2023#3

        @Mofi

        Thanks for your tips.
        I'll try it tomorrow if possible.

        Greetings,

         Angel

        3
        NewbieNewbie
        3

          Nov 21, 2023#4

          @Mofi

          I have now re-registered in the forum. (rene76)

          I have now set everything up like this and the display is better. Thanks again for your help.

          What I can't do is change the icon of the default shortcuts. For example, at TXT.

          In the registry it is always the entry key where DefaultIcon is called that I want to change with the following symbol:

          Code: Select all

          @="\"C:\\Windows\\System32\\shell32.dll\",70"
          But where do I have to add this key for UltraEdit for the TXT file type?
          I can't find an entry under HKEY_CLASSES_ROOT that has anything to do with UltraEdit.

          With the video player PotPlayer as an example, it would be:

          "HKEY_CLASSES_ROOT\PotPlayerMini64.MKV",, "DefaultIcon",, "C:\Program Files\DAUM\PotPlayer\PotIcons64.dll,20"

          Otherwise, I change the symbol in the EXE.
          I just have to change this again every time I update UltraEdit.

          Greetings,

           Angel

          6,685587
          Grand MasterGrand Master
          6,685587

            Nov 21, 2023#5

            Yes, Microsoft has removed the possibility to select an icon for an associated file type. That must be done by the user directly in the registry using either the Registry Editor or the command line utility reg.exe or a third-party application. I posted detailed instructions for changing the icon of an associated file type with reg.exe in my forum post Stylish round application icon as of UltraEdit/UEStudio 2022.2 instead of black square icon as of UE/UES 2023.0.

            Note: The default value of registry key DefaultIcon can reference also the UltraEdit executable itself. It must not be an icon file. The icon index number can be referenced after the executable file name with a comma and the number. ,0 for the first icon resource in an executable or library file with one or more icon resources is usually not specified in registry. See the developer blog How the shell converts an icon location into an icon written by the Microsoft developer Raymond Chen.

            The Windows 11 23H2 default is txtfilelegacy for the file extension .txt. Older versions of Windows used the registry key txtfile. I don't know since which version of Windows the registry key txtfilelegacy is used for file extension .txt instead of txtfile. The registry key txtfilelegacy has neither the key DefaultIcon nor the key Shell\Open\Command. I have not yet analyzed where Windows File Explorer of Windows 11 loads now the information which icon to use for files with file extension .txt and which program to start for opening files with file extension .txt.

            I don't care about file associations because of not using Windows File Explorer as file manager. I use since more than 25 years licensed Total Commander which lets me view any file of any type with pressing key F3 and lets me open any file of any type with pressing key F4 for editing the file in UltraEdit. So, I am not really interested in what Microsoft changes all the time regarding to file associations on Windows. But I could find out what to change in registry to get files with file extension .txt displayed in Windows File Explorer with one of the icons inside the UltraEdit executable if that is important for you.

            See also: Revamped UltraEdit Icons—Your Feedback Appreciated! UltraEdit for Windows and UEStudio 2023.2 with the revamped icons were released on 2023-12-15.
            Best regards from an UC/UE/UES for Windows user from Austria

            3
            NewbieNewbie
            3

              Nov 21, 2023#6

              @Mofi

              Finally, get to know someone who doesn't know what to do with Windows File Explorer.
              I've been using Total Commander since Windows 3.x and under DOS it was Norton Commander.

              The link is not the problem, it's just that it doesn't look good when the text files etc. have such a yellow symbol.
              I like the default Windows icon for text files better.

              I have Windows 11 22H2 and first I need this entry: HKEY_CLASSES_ROOT\.txt
              And then found out this one: [HKEY_CLASSES_ROOT\txt_auto_file]

              Only with UltraEdit, the DefaultIcon key has no effect.
              Otherwise, I can actually get my desired symbol for the link with the entry DefaultIcon in every program.

              So I changed the symbol using the Resource Hacker tool.

              Greetings,

               Angel

                Nov 21, 2023#7

                And it works!
                A registry entry from the previous editor interfered where I uninstalled normally.

                Here is my batch file:
                (Attention: adjust the UltraEdit path yourself)

                Code: Select all

                reg.exe delete "HKCR\.ini" /f
                reg.exe delete "HKCR\.log" /f
                reg.exe delete "HKCR\.txt" /f
                reg.exe delete "HKCR\inifile" /f
                reg.exe delete "HKCR\logfile" /f
                reg.exe delete "HKCR\txtfile" /f
                reg.exe delete "HKCR\ini_auto_file" /f
                reg.exe delete "HKCR\log_auto_file" /f
                reg.exe delete "HKCR\txt_auto_file" /f
                
                Reg.exe add "HKCR\.txt" /ve /t REG_SZ /d "txt_auto_file" /f
                Reg.exe add "HKCR\txt_auto_file\DefaultIcon" /ve /t REG_SZ /d "C:\Windows\System32\imageres.dll,-102" /f
                Reg.exe add "HKCR\txt_auto_file\shell\edit\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" \"%%1\"" /f
                Reg.exe add "HKCR\txt_auto_file\shell\open\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" \"%%1\"" /f
                Reg.exe add "HKCR\txt_auto_file\shell\print\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" /p \"%%1\"" /f
                
                Reg.exe add "HKCR\.ini" /ve /t REG_SZ /d "ini_auto_file" /f
                Reg.exe add "HKCR\ini_auto_file" /v "FriendlyTypeName" /t REG_SZ /d "@shell32.dll,-10151" /f
                Reg.exe add "HKCR\ini_auto_file\DefaultIcon" /ve /t REG_SZ /d "C:\Windows\System32\imageres.dll,-69" /f
                Reg.exe add "HKCR\ini_auto_file\shell\edit\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" \"%%1\"" /f
                Reg.exe add "HKCR\ini_auto_file\shell\open\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" \"%%1\"" /f
                Reg.exe add "HKCR\ini_auto_file\shell\print\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" /p \"%%1\"" /f
                
                Reg.exe add "HKCR\.log" /ve /t REG_SZ /d "log_auto_file" /f
                Reg.exe add "HKCR\log_auto_file" /ve /t REG_SZ /d "Log-Datei" /f
                Reg.exe add "HKCR\log_auto_file" /v "FriendlyTypeName" /t REG_SZ /d "@shell32.dll,-10151" /f
                Reg.exe add "HKCR\log_auto_file\DefaultIcon" /ve /t REG_SZ /d "C:\Windows\System32\imageres.dll,-102" /f
                Reg.exe add "HKCR\log_auto_file\shell\edit\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" \"%%1\"" /f
                Reg.exe add "HKCR\log_auto_file\shell\open\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" \"%%1\"" /f
                Reg.exe add "HKCR\log_auto_file\shell\print\Command" /ve /t REG_SZ /d "\"C:\Program Files\UltraEdit\uedit64.exe\" /p \"%%1\"" /f