Sublime Forum

Windows build lacks a "Company Name" in sublime_text.exe

#1

Currently, the latest stable Sublime Text 3 build (3126) defines all the necessary versioninfo resource metadata in sublime_text.exe, except for a “Company Name”.

Windows 7 and later require a valid “Company Name” to be embedded in the executable for the program to nicely integrate with Explorer. For example, this can prevent Sublime from being listed in the “Open With” dialog prompt, as well as prevent the program from being listed as a “Default Program” (Control Panel -> Default Programs -> Set your Default Program). “Default Program” support is important since it is required to correctly bind a program to a file type in Windows.

This topic is related to:
Default programs entry for Windows
which shows a sample of how to automatically bind Sublime to a file type.

2 Likes

Cannot make sublime 3 default editor windows 10 (Sept 2018)
#2

have you got a source for that please? :slight_smile: (apart from the thread you linked to, I’m interested in something more official :wink: )

I always wondered how programs show up in the Open With list, that other thread shows it is done in the registry by having “registered capabilities”, which is good to know. However, I am so used to programs not showing up that I just browse for them manually from that list and set as default from there - no Company Name metadata required.

0 Likes

#3

MSDN covers the basics of registering an application

Default Programs (Windows)

The Company Name bit was found by experimentation. I have a registry script setup to bind Sublime to Default Programs with the keys listed in the MSDN article. Even with the keys in place, Sublime still will not appear in the Default Programs list (Control Panel -> Default Programs -> Set your Default Programs). After poking around with other registered entries, I noticed that each app had a company name defined. So, using Visual Studios I set the company name to “Sublime”. After which, Sublime appeared in the Default Programs list.

With the file associations properly setup, right clicking on a bound file type would then list Sublime in the open with dialog for that type.

If you’d like to test this yourself, here is my registry script

My Registry Script

Please make sure the paths are correct (C:\Program Files\Sublime Text\sublime_text.exe) and I recommend you actually read through the script to get an idea of what it’s doing.

After running the above, check the Default Programs list and note that Sublime doesn’t appear. Add a company name (just open sublime_text.exe in Visual Studios or another program that can edit resources) and then re-check the list. Once sublime appears in the Default Program list, it should also appear in the “Open With” list for one of the types bound by the script (as, asm, c, cpp, h, txt, …)

2 Likes

#4

I did a bit more digging on the Company Name. According to

VERSIONINFO resource (Windows) – (Search for “CompanyName”)

Company that produced the file. for example, “Microsoft Corporation” or
“Standard Microsystems Corporation, Inc.” This string is required.

It looks like some parts of Windows are actually checking that field. I’m guessing the Default Programs list is treating Sublime as an invalid program; however, I haven’t seen any other side effects of leaving off the Company Name.

3 Likes

#5

nice one, thanks for your comprehensive answers :slight_smile: I will check out your registry script when I get chance :slightly_smiling:

as it is so easy to set the Company Name field, hopefully the ST devs will do so :wink:

0 Likes

#6

This was addressed in build 3127

0 Likes