Archive

Posts Tagged ‘File Extensions’

Workarround: IE11 changing download file extension to .zip

At ClipFlair Gallery, apart from opening a ClipFlair activity in ClipFlair Studio, downloading of an activity (.clipflair) file is also supported.

However, because the component serialization file format of ClipFlair Studio is XML plus media assets packed in .zip archive (with nesting allowed, where components and whole activities can be placed in other activities), Internet Explorer 11 (and probably other browsers too) was downloading .clipflair files as .zip (changing their file extension).

At first, I thought that occured because I was using MIME type “application/zip” at the IIS web server/site settings for that file extension. So then I tried to change it to “application/octet-stream” hoping that one would be treated as an “opaque” data stream.

However, eventually I ended up setting a custom MIME type “application/clipflair” for the file extension “.clipflair”, because even with “application/octet-stream” (as with the “application/zip” that I had before), IE11 was still saving the .clipflair file as .zip (obviously detecting the zip content in the download stream).

<?xml version=”1.0″?>
<configuration>

<system.webServer>

<directoryBrowse enabled=”true” showFlags=”Size, Extension”/>

<defaultDocument>
<files>
<clear/>
<add value=”index.html”/>
<add value=”Default.aspx”/>
<add value=”Default.html”/>
</files>
</defaultDocument>

<caching>
<profiles>
<add extension=”.log”
policy=”CacheUntilChange”
kernelCachePolicy=”CacheUntilChange”/>
</profiles>
</caching>

<staticContent>
<mimeMap fileExtension=”.log” mimeType=”text/plain”/>
<mimeMap fileExtension=”.clipflair” mimeType=”application/clipflair”/>
<mimeMap fileExtension=”.dzi” mimeType=”text/xml”/>
<mimeMap fileExtension=”.dzc” mimeType=”text/xml”/>
<mimeMap fileExtension=”.cxml” mimeType=”text/xml”/>
</staticContent>

</system.webServer>

<system.web>
<compilation debug=”true” targetFramework=”4.0.3″/>
</system.web>

</configuration>

broken .LNK files assignment (or how to destroy and fix Windows 7)

A friend just called me this morning that their notebook with Windows 7 Starter started today showing the same icon for every Start menu item and for shortcuts (e.g. on the desktop) and when trying to open them the same program would always try to open them.

Seems he had right-clicked and done “Open With…” on a “.lnk” (Windows shortcut) file that was pointing to a missing (deleted) video file. Not knowing what .lnk files really are (filesystem shortcuts), he tried to open it with Windows Media Player.

There are several issues here that Microsoft should fix:

  1. Somebody at Microsoft changed Windows (think this happened at Windows Vista) to have “Always open with this program” option checked by default and this means users can easily damage file assignments that way.
  2. Windows doesn’t seem to protect such critical file extensions from getting reassigned by accident or by malicious code. In fact System File Protection (SFP) should take care to restore this automatically
  3. The Open With dialog shouldn’t allow one to check “Always open with this program” for critical file extensions like “.lnk”.

For older Windows versions (not Vista or Windows 7) I found a solution listed at:
http://support.microsoft.com/kb/172053/en-us?fr=1

but for Windows Vista and Windows 7 the correct solution is discussed at:

http://www.makeuseof.com/answers/change-fix-file-associations-windows-7/

There a Microsoft MVP (admin of http://winhelponline.com/) points to

http://www.winhelponline.com/fileasso/lnkfix_vista.zip

  1. You download this file and unpack/execute the .reg (registry) file that is included in the ZIP archive.
  2. Then Windows will warn you that the changes will occur to Windows Registry, you accept that
  3. Then you get a message the merge was completed.
  4. From Start menu, LOG OFF (from Shutdown submenu select Logoff/Disconnect from system) and LOG ON again.
  5. If everything isn’t fine at the new log-on session, you can also try rebooting the machine.
%d bloggers like this: