seandr
Posts: 11
Joined: Tue May 29, 2012 4:59 am

registering multiple file extensions with one mime-type

Greetings,

Evaluating your product and liking what I'm seeing so far. However, I've run into one issue.

My application needs to register two file extensions, both of which should map to the mime type "text/tab-separated-values", which is standard for tab-delimited text files. When I try to register this mime type for two extensions, Advanced Installer won't let me. Why not? Windows certainly doesn't place any restrictions on the number of extensions that can share a mime type.

Is there any way to make this work?

Thanks,
Sean
seandr
Posts: 11
Joined: Tue May 29, 2012 4:59 am

Re: registering multiple file extensions with one mime-type

Also, my main executable has two embedded icons. When I try to map two different ProgIDs to the second embedded icon, I get this error message:

"A row with this key [c:\somepath\my.exe#1] was already registered in the table"

And then Advanced Installer crashes.

Anyway to reuse the second icon with multiple ProfIDs?

-Sean
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: registering multiple file extensions with one mime-type

Hi Sean and welcome to our forums,

The MIME type limitation from Advanced Installer is actually a reflection of the limitation which was imposed to us by Windows Installer.
To handle the extensions installation we use standard MSI table, as we do for other parts of the MSI package too, in this case we use the MIME table.

As you can see in Microsoft docs the column "ContentType" is an identifier so it must be unique for each row from the table. Usually this type of limitation is easily overpassed using public properties, but according to MSDN this column is not formatted, so unfortunately you cannot use this trick.
Also, my main executable has two embedded icons. When I try to map two different ProgIDs to the second embedded icon, I get this error message:
"A row with this key [c:\somepath\my.exe#1] was already registered in the table"
And then Advanced Installer crashes. Anyway to reuse the second icon with multiple ProfIDs?
I tried reproducing this in a new project, but with no success. Can you reproduce it in a new project?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
seandr
Posts: 11
Joined: Tue May 29, 2012 4:59 am

Re: registering multiple file extensions with one mime-type

Hi Bogdan,

Thanks for the explanation regarding mime types - I figured it was an MSI limitation.

I reproduced the crash with a new project, specifically by performing the following steps:
1) Create new Professional project
2) Add attached executable file to File and Folders
3) Create a progid in file associations, select the second icon from the attached exe
4) Create a second progid and select the same icon

Result: Error message and crash.

The attached exe is 64-bit, in case that is relevant. I'm running Windows 7 64-bit.

-Sean

P.S. Looks like my exe was too big to attach (even though I zipped it). Is there another way for me to send it?
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: registering multiple file extensions with one mime-type

Hi Sean,

There is no need to send it, we managed to reproduce the crash, thanks for bringing it to our attention.

A fix for this will be included in the next release, scheduled for the end of June.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
seandr
Posts: 11
Joined: Tue May 29, 2012 4:59 am

Re: registering multiple file extensions with one mime-type

Great, in the mean time I've worked around this by setting it up with the first icon in the development environment and then editing the icon index directly in the project file.

-Sean

Return to “Common Problems”