Sunday, July 13, 2008

Add My App to the Open With Menu

I've had a VB.NET application which claim some file types.  When a user double-clicks on one of these file types the application is launched.  However when they right-click on it and select the "Open With" menu, my application comes up, but only the icon is shown.  There is no text with the icon.

I searched on the internets with no solution.  A fair number of people asked this question, like this person
but no answers.

I tried different things in the Setup part of the application with no luck.  Finally, I realized the issue was with the MUICache value in the Registry, however I did not want to run a .reg file after the install. 

Finally, I stumbled upon the answer, and it seems to be setting the AssemblyDescription value in the AssemblyInfo.vb file of your main executable.  What's odd is that in the recent past, I tried setting some values here and it didn't make a difference. 

The key might have to do is that fact that there was a blank values in the MUICache for my application, and once I deleted the key associated with my application from the MUICache then it registered.  On that note, it could be the AssemblyDescription, AssemblyTitle or AssemblyProduct values as they all have the same value.  I'll need to do more testing to verify exactly which one is the key value to be filled out.

Also, the MUICache values don't get removed when you uninstall your application.

The above technique basically is crap. It only works if the entry doesn't exist in the MUICache. What I mean by that is if you have a blank entry in the MUICache, delete it, then install your application (or just launch it), a new entry will now be in the MUICache with the proper information. For some reason, a previous verison of mine entered a blank value into the MUICache, and now i can't get rid of it, or overwrite it through the install. I'd rather not remove it from my code, but I might end up having to.

No comments: