Sublime Forum

Windows: Sublime Text 3 gives Directory Opus the wrong icons

#1

I have ST 3 build 4199, running on Windows 10. I use the file manager called ‘Directory Opus’. A range of file icons within Opus show up, until I press F5, with the sublime icon. The filetypes at issue seem to be or at least include shortcuts to directories. Indeed it seems that - as the main Opus developer put it - Sublime ‘seems to be taking over every other icon’. Screenshots:

image

The ‘Notes’ item is in fact a (shortcut to a) directory.

I’d be grateful for any help; and here we might have a bug in Sublime.

0 Likes

#2

That’s nothing I’ve ever seen ST doing by any means.

0 Likes

#3

Right. Still, new things do come to light (or else there would be familiar phenomena). And even if Sublime is not the cause of the problem, it might be that someone here can point me towards a solution.

0 Likes

#4

ST’s installer registers the application to be available in “Open with…” context menue via:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\sublime_text.exe]

and sets up some file types it claims to support via:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\sublime_text.exe\SupportedTypes]

Beyond that it registers an “Open with Sublime Text…” context menu item via

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\sublime_text]
@="Open with Sublime Text"
"Icon"="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\",0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\sublime_text\command]
@="\"C:\\Program Files\\Sublime Text\\sublime_text.exe\" \"%1\""

None of those registry keys would hijack all file types or mess things up that badly.

TBH, I’d hesitate to use those legacy WinXP apps like FileTypesMan. I haven’t followed their development, but the way Windows 10/11 handle file type associations has slightly changed - adding another layer to dynamically handle active associations beyond what’s pre-configured in HKEY_CLASSES_ROOT aka. HKEY_LOCAL_MACHINE\SOFTWARE\Classes. Hence I wouldn’t be surprised such tools to mess things up.

Nevertheless everything looks fine here:

If really everything is assigned to Sublime Text, I’d start looking for HKEY_CLASSES_ROOT\* key in registry.

If it’s (Default) value is non-empty, that’s likely the root cause as it assigns any file extension to specified application.

Also check if it contains a sub-key like \shell\open\command to Sublime Text. Remove open key. It shouldn’t exist in *.

Don’t mess with file associations under SOFTWARE\Explorer by any means. Those are managed by Windows.

0 Likes

#5

Thank you for that thoughtful, informed and informative reply.

FileTypesMan: its webpage does say, ‘This utility works on any version of Windows from Windows XP to Windows 11’, though admittedly until recently I was using an outdated version of the tool!

By ‘here’ (‘Nevertheless everything looks fine here’) you mean your machine, as inspected by FileTypesMan. Right.

I do find that I have a registry key HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text. That key contains the following two items.

(1) A key called ‘command’, which itself contains, only, an entry called (Default), the content of which is `C:\Program Files\Sublime Text\sublime_text.exe “%1”.

(2) An entry called, again, (Default), and which is empty.

Ought I to delete all of that, i.e., delete HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text?

0 Likes

#6

This one is fine. That’s what adds the context menu item “Open with Sublime Text” to all file types.

Instead - as already adviced:

  1. make sure, (Default) value in HKEY_CLASSES_ROOT\* is empty.
  2. make sure no HKEY_CLASSES_ROOT\*\shell\open key exists.

If those are ok, it may be a long journey to find out what got borked - none of which however is related to or caused by Sublime Text, but more likely result of unproper “tweaking” of Windows internals.

0 Likes

#7

I should have said: conditions 1 and 2 are satisfied, i.e., those keys are as you say they should be.

I should add that Windows Explorer, as against Directory Opus, does not have the problem.

0 Likes

#8

Just now, in a move of which you might disapprove, I used another utility - the File Association Fixer - to repair what that program calls the ‘text’ filetype. The result seems to be that now Opus gives the correct icons for everything (without using F5). But this problem has recurred before, so I’ll see . .

0 Likes