File Types in Deployment Project - "Open With" list

  • Thread starter Thread starter Paul Sullivan
  • Start date Start date
P

Paul Sullivan

I have encountered the same problem another posted about several
months
ago. Unfortunately, there was no result posted on the old thread. I
will let the original message text stand and ask if anyone can help me
with this..

"I have created a deployment project for a .NET program which opens a
file with a custom extension. I have added the file type to the
deployment project. After installation, double clicking a file with
that extension opens it correctly. It also displays with the correct
icon. However, when I right click in Explorer to display the "Open
With" list, the icon for my program appears, but not the name. This
looks really messy. "

Is there a way, either through registry edit or through the Setup
Project to correct this issue?

Many thanks,

Paul Sullivan
Systems Programmer
Digital Library Center
University of Florida Libraries
 
Hi Paul,

Based on your description, the problem is your installed application's name
doesn't appear in the target file's context menu's "Open With" list. Please
correct me if I misunderstand anything.

To add an application to a certain type file's open with list, first you
need to add a corresponding key for that application under the
HKEY_CLASSES_ROOT\Applications, for example:

HKEY_CLASSES_ROOT
Applications
MyProgram.exe
shell
open
command
(Default) REG_SZ
"D:\Demo\MyProgram.exe" "%1"


Then add that application key to the target file extension's
"OpenWithList"sub key under the HKEY_CLASSES_ROOT, for example:
HKEY_CLASSES_ROOT
.xx1
OpenWithList
MyProgram.exe

I suggest you can test this in your development machine first, and ensure
it works. Then export the above 2 registry keys as .reg file and import
them to your application's setup project Registry editor. The
HKEY_CLASSES_ROOT\Applications\shell\open\command key's default value
should be modified as the following:

"[TARGETDIR]\MyProgram.exe" "%1"


Wish it works!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top