I'm creating a media player using Godot. The application is already able to play .mp3 files by using the open with option in the file explorer. The name of the project is "Media player" and the executable is called "Media Player.exe" yet when presented in the open with menu it is displayed as "Godot Engine".
So my question: Is it possible to change this? If so, how?
Note: The option is only visible after first opening a .mp3 file by manually navigating to the executable. The .mp3 file is thus not opened with the Godot game engine but by an application made with it.
Here is an example.
In Godot, when you are exporting for Windows (with export templates installed, with a Window Desktop preset), on the "Options" tab, at the bottom you will find an "Application" section.
There you can find fields to set:
These match the fields you see in the properties of the exe.
In my tests I find I need to put the name I want in the Open With dialog in the "File Description" field.
But that would not work if you didn't configure rcedit. Download rcedit, then go to Menu Editor -> Editor Settings -> Export -> Windows -> Rcedit and set the path to where you downloaded it.
Godot will use rcedit to edit the exe (similar to using resourcehacker) to insert those values. If rcedit is not configured, Godot will skip the step silently.
By the way, Windows will copy "Company Name" and "File Description" fields to:
Equipo\HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\Shell\MuiCache
There you will find two string values with a name that start with the path of your exe. One of the string value has a name that ends with ".ApplicationCompany" and has the value of the "Company Name" field. The other string value has a name that ends with ".FriendlyName" and has the the value of the value of the "File Description" field.
If you don't see these values update in the Open With dialog, it is because Windows is reading them from there.
You may also be interested in: Changing application icon for Windows.