FTYPE reports wrong executable file

Microsoft Windows
Post Reply
Rekrul
Posts: 52
Joined: 2021-Aug-15, 11:29 pm

FTYPE reports wrong executable file

Post by Rekrul »

If I do;

assoc .avi

I get;

.avi=avifile

And when I do;

ftype avifile

I get;

"C:\Program Files\Windows Media Player\wmplayer.exe" /prefetch:8 /Open "%L"

(yes, it's an old version of windows)

However, AVI files do not open in Windows Media Player. They open in Media Player Classic - Home Cinema, just like MP4, MKV, etc. Those all show the correct association, but AVI doesn't.

Why does FTYPE show the wrong executable file for AVI files? I mean, this information must be somewhere in Windows, probably in the registry, so are there two lists of associations? One that FTYPE looks at and the real one that Windows uses when you double-click a file?
User avatar
Simon Sheppard
Posts: 190
Joined: 2021-Jul-10, 7:46 pm
Contact:

Re: FTYPE reports wrong executable file

Post by Simon Sheppard »

I have updated the FTYPE page with some additional details about this, to make changes now requires applying a hash algorithm so generally has to be applied via group policy.
Rekrul
Posts: 52
Joined: 2021-Aug-15, 11:29 pm

Re: FTYPE reports wrong executable file

Post by Rekrul »

Simon Sheppard wrote: 2022-Oct-31, 6:25 pm I have updated the FTYPE page with some additional details about this, to make changes now requires applying a hash algorithm so generally has to be applied via group policy.
Interesting, but that doesn't explain what's going on in my case.

FTYPE is supposed to tell you what executable file a particular type of file will be opened with. I have AVI files associated with Media Player Classic - Home Cinema. So why does FTYPE think they're opened with Windows Media Player?

Where is FTYPE getting this inaccurate information from? And if it's getting it from wherever Windows stores its list of file associations, how is it that the files are being opened with a different program than the one that's 'officially' associated with them?
User avatar
Simon Sheppard
Posts: 190
Joined: 2021-Jul-10, 7:46 pm
Contact:

Re: FTYPE reports wrong executable file

Post by Simon Sheppard »

Rekrul wrote: 2022-Nov-01, 6:23 am Interesting, but that doesn't explain what's going on in my case.

FTYPE is supposed to tell you what executable file a particular type of file will be opened with. I have AVI files associated with Media Player Classic - Home Cinema. So why does FTYPE think they're opened with Windows Media Player?

Where is FTYPE getting this inaccurate information from? And if it's getting it from wherever Windows stores its list of file associations, how is it that the files are being opened with a different program than the one that's 'officially' associated with them?
A file type is not the same as a file extension, more than one file extension can be associated with the same File Type.

FTYPE predates all of the recent changes and so I think it just displays whatever File Types it can see setup in the registry.
What does ASSOC .avi return on your system?

Microsoft:
In the absence of a valid hash, we ignore the default in the registry.
Rekrul
Posts: 52
Joined: 2021-Aug-15, 11:29 pm

Re: FTYPE reports wrong executable file

Post by Rekrul »

Simon Sheppard wrote: 2022-Nov-01, 8:57 pm A file type is not the same as a file extension, more than one file extension can be associated with the same File Type.

FTYPE predates all of the recent changes and so I think it just displays whatever File Types it can see setup in the registry.
What does ASSOC .avi return on your system?
Image
User avatar
Simon Sheppard
Posts: 190
Joined: 2021-Jul-10, 7:46 pm
Contact:

Re: FTYPE reports wrong executable file

Post by Simon Sheppard »

Is the behaviour the same after a reboot? Sometimes a restart will reset things.

On the MPC website they have:
July 16, 2017 XhmikosR
v1.7.13, the latest, and probably the last release of our project…


So it is possible that whatever method they use to set file associations is out of date.
Rekrul
Posts: 52
Joined: 2021-Aug-15, 11:29 pm

Re: FTYPE reports wrong executable file

Post by Rekrul »

Simon Sheppard wrote: 2022-Nov-02, 9:10 pm Is the behaviour the same after a reboot? Sometimes a restart will reset things.
Yes, always the same results.
Simon Sheppard wrote: 2022-Nov-02, 9:10 pmOn the MPC website they have:
July 16, 2017 XhmikosR
v1.7.13, the latest, and probably the last release of our project…


So it is possible that whatever method they use to set file associations is out of date.
I could be mistaken, but I don't think I ever allowed the program itself to make the associations. I never installed it, I always downloaded the portable version, unpacked it where I wanted and then made the associations manually, so that only my chosen file types would be opened by it.

In fact, I just right-clicked on an AVI file, chose Open With, selected MPlayer (the cross-platform, command-line player) and told Windows to always use that program to open files of that type. Now when I double-click AVI files, they open in MPlayer, however ftype still says that they're associated with Windows Media Player. I then changed it back to MPC-HC, which worked fine, but no change in ftype.

To be clear, this isn't causing me any problems. I can change associations and they work just fine. I'm more intrigued by the mystery of where ftype is getting its information from, which is why I haven't yet tried changing it from the command line.

Obviously Windows is storing the correct association information, because when I double click an AVI file, my preferred program opens it. So where is ftype getting its incorrect information from? Why doesn't it change when I manually change associations? And if ftype reports the official Windows association for any given file type, why is Windows not following it?

It just seems like there are two sets of associations, the ones that Windows actually uses and the ones reported by ftype, which may or may not coincide with each other.
Post Reply