Discussion:
IE and File Extensions
(too old to reply)
Steve
2007-06-27 17:34:03 UTC
Permalink
Sorry if this is the wrong group.

When I click to open a download using IE, it some how knows the application
it's supposed to start to open the file. Easy question, right? I thought
so, it's just the file type association but it's not. I have completely
removed this key from the registry. If I now download the file and save it to
disk and then try to open it can't do it because the file association has
been removed. However, IE still somehow knows which app to use. I thought
maybe this info was cached but after a reboot it still knows. After deteling
this key, Firefox has no idea what to open the file with.

Any ideas?

Thanks,
Steve
Paul Baker [MVP, Windows - SDK]
2007-06-27 18:56:24 UTC
Permalink
Oh no, it's not as simple as that.

Internet Explorer's behaviour here is related to WinInet's MIME type
handling and detection, as described here:
http://msdn2.microsoft.com/en-us/library/ms775150.aspx

Paul
Post by Steve
Sorry if this is the wrong group.
When I click to open a download using IE, it some how knows the application
it's supposed to start to open the file. Easy question, right? I thought
so, it's just the file type association but it's not. I have completely
removed this key from the registry. If I now download the file and save it to
disk and then try to open it can't do it because the file association has
been removed. However, IE still somehow knows which app to use. I thought
maybe this info was cached but after a reboot it still knows. After deteling
this key, Firefox has no idea what to open the file with.
Any ideas?
Thanks,
Steve
Steve
2007-06-27 20:54:00 UTC
Permalink
Thanks Paul. I did read up on Mime handlers (don't have a custom one)
beforehand but I'm still don't see how it works. IE somehow knows the the
CLSID of the component to open the document with but I don't see how. It's
not registered in the Mime\database and I've removed the extension from here:
HKEY_CLASSES_ROOT\.**.

Thanks again,
Steve
Post by Paul Baker [MVP, Windows - SDK]
Oh no, it's not as simple as that.
Internet Explorer's behaviour here is related to WinInet's MIME type
http://msdn2.microsoft.com/en-us/library/ms775150.aspx
Paul
Post by Steve
Sorry if this is the wrong group.
When I click to open a download using IE, it some how knows the application
it's supposed to start to open the file. Easy question, right? I thought
so, it's just the file type association but it's not. I have completely
removed this key from the registry. If I now download the file and save it to
disk and then try to open it can't do it because the file association has
been removed. However, IE still somehow knows which app to use. I thought
maybe this info was cached but after a reboot it still knows. After deteling
this key, Firefox has no idea what to open the file with.
Any ideas?
Thanks,
Steve
Paul Baker [MVP, Windows - SDK]
2007-06-28 14:12:13 UTC
Permalink
I did not have time to read through those documents in detail myself. If
you've read them in detail and still don't think it is following the
documented steps, you can try using Registry Monitor to see which registry
entries it is looking at:
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Regmon.mspx

Paul
Post by Steve
Thanks Paul. I did read up on Mime handlers (don't have a custom one)
beforehand but I'm still don't see how it works. IE somehow knows the the
CLSID of the component to open the document with but I don't see how.
It's
HKEY_CLASSES_ROOT\.**.
Thanks again,
Steve
Post by Paul Baker [MVP, Windows - SDK]
Oh no, it's not as simple as that.
Internet Explorer's behaviour here is related to WinInet's MIME type
http://msdn2.microsoft.com/en-us/library/ms775150.aspx
Paul
Post by Steve
Sorry if this is the wrong group.
When I click to open a download using IE, it some how knows the application
it's supposed to start to open the file. Easy question, right? I thought
so, it's just the file type association but it's not. I have completely
removed this key from the registry. If I now download the file and save
it
to
disk and then try to open it can't do it because the file association has
been removed. However, IE still somehow knows which app to use. I thought
maybe this info was cached but after a reboot it still knows. After deteling
this key, Firefox has no idea what to open the file with.
Any ideas?
Thanks,
Steve
Steve
2007-06-28 17:20:03 UTC
Permalink
I think I know what's going on now, this guy's blog hints at my problem. IE
does a CLSID sniff on compound documents (which is what i'm using). So even
if I rename my file extension, it still knows the component it needs to
create to open it - unfortuanetely this makes it run through automation and
the app is not visible in this mode by defaul. Now all I need to figure out
is if clsid sniffing can be by-passed some how.

http://blogs.msdn.com/ie/archive/2005/02/01/364581.aspx

Steve
Post by Paul Baker [MVP, Windows - SDK]
I did not have time to read through those documents in detail myself. If
you've read them in detail and still don't think it is following the
documented steps, you can try using Registry Monitor to see which registry
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Regmon.mspx
Paul
Post by Steve
Thanks Paul. I did read up on Mime handlers (don't have a custom one)
beforehand but I'm still don't see how it works. IE somehow knows the the
CLSID of the component to open the document with but I don't see how.
It's
HKEY_CLASSES_ROOT\.**.
Thanks again,
Steve
Post by Paul Baker [MVP, Windows - SDK]
Oh no, it's not as simple as that.
Internet Explorer's behaviour here is related to WinInet's MIME type
http://msdn2.microsoft.com/en-us/library/ms775150.aspx
Paul
Post by Steve
Sorry if this is the wrong group.
When I click to open a download using IE, it some how knows the application
it's supposed to start to open the file. Easy question, right? I thought
so, it's just the file type association but it's not. I have completely
removed this key from the registry. If I now download the file and save
it
to
disk and then try to open it can't do it because the file association has
been removed. However, IE still somehow knows which app to use. I thought
maybe this info was cached but after a reboot it still knows. After deteling
this key, Firefox has no idea what to open the file with.
Any ideas?
Thanks,
Steve
Paul Baker [MVP, Windows - SDK]
2007-09-17 14:33:28 UTC
Permalink
Steve,

I think I missed your concern "Now all I need to figure out is if clsid
sniffing can be by-passed some how".

Take a look at the FEATURE_MIME_HANDLING and FEATURE_MIME_SNIFFING features,
which can be read/set using the UrlMon API:
http://msdn2.microsoft.com/en-us/library/ms537169.aspx

They also corresond to the "Windows Components\Internet Explorer\Security
Features\Consistent Mime Handling" and "Windows Components\Internet
Explorer\Security Features\Mime Sniffing Safety Feature" policies
respectively. You can read/set them using gpedit.msc.

Paul
Post by Steve
I think I know what's going on now, this guy's blog hints at my problem.
IE
does a CLSID sniff on compound documents (which is what i'm using). So even
if I rename my file extension, it still knows the component it needs to
create to open it - unfortuanetely this makes it run through automation and
the app is not visible in this mode by defaul. Now all I need to figure out
is if clsid sniffing can be by-passed some how.
http://blogs.msdn.com/ie/archive/2005/02/01/364581.aspx
Steve
Post by Paul Baker [MVP, Windows - SDK]
I did not have time to read through those documents in detail myself. If
you've read them in detail and still don't think it is following the
documented steps, you can try using Registry Monitor to see which registry
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Regmon.mspx
Paul
Post by Steve
Thanks Paul. I did read up on Mime handlers (don't have a custom one)
beforehand but I'm still don't see how it works. IE somehow knows the the
CLSID of the component to open the document with but I don't see how.
It's
HKEY_CLASSES_ROOT\.**.
Thanks again,
Steve
Post by Paul Baker [MVP, Windows - SDK]
Oh no, it's not as simple as that.
Internet Explorer's behaviour here is related to WinInet's MIME type
http://msdn2.microsoft.com/en-us/library/ms775150.aspx
Paul
Post by Steve
Sorry if this is the wrong group.
When I click to open a download using IE, it some how knows the application
it's supposed to start to open the file. Easy question, right? I thought
so, it's just the file type association but it's not. I have completely
removed this key from the registry. If I now download the file and save
it
to
disk and then try to open it can't do it because the file
association
has
been removed. However, IE still somehow knows which app to use. I thought
maybe this info was cached but after a reboot it still knows. After deteling
this key, Firefox has no idea what to open the file with.
Any ideas?
Thanks,
Steve
Loading...