3

I have a program, MyApp, where I can open a text file, which works great. The application is created in C# with Visual Studio 2003, .NET 1.1.

But under the [right-click on file context-menu in Explorer -> "Open With"] just the icon is shown, not the application name or description.

As shown here: Open With context-menu (http://data.fuskbugg.se/skalman02/4e450ba043602_openwith.png)

If we look at Notepad++ in the image that text seems to be the description text, same as under File properties general tab for notepad++.exe.

What value is used there? How do I set that value?

[EDIT]: The registry entries automatically generated when using "open With -> browse for application" are: HKEY_CLASSES_ROOT\Applications\MyApp.exe\shell\open\command (default) under the key command is: "correct path" "%1"

Cœur
  • 37,241
  • 25
  • 195
  • 267
Hrym
  • 578
  • 6
  • 8
  • 2
    Impossible to reverse-engineer the registry content from a screen shot. Just document what you put in the registry. – Hans Passant Aug 12 '11 at 11:29
  • I haven't added anything manually in the registry. But when I do a open with -> browse for application some values are automatially generated under .filextention and HKEY_CLASSES_ROOT\Applications\MyApp – Hrym Aug 12 '11 at 11:33
  • Have you checked attributes in AssemblyInfo to ensure you have an AssemblyTitle? Not sure if that's what gets used, but it might be. – ForbesLindesay Aug 12 '11 at 11:44
  • I don't have an answer but this is documented in MSDN at [File Types and File Associations](http://msdn.microsoft.com/en-us/library/cc144104%28v=vs.85%29.aspx) – Justin Aug 12 '11 at 12:42
  • Thanks for the link Kragen :) @Tuskan360, It really was the AssemblyInfo! I cleared the registry of all entries related to MyApp, and now it got updated... The problem was probably that I tried before without the AssemblyInfo filled out. Thanks! – Hrym Aug 12 '11 at 12:48

1 Answers1

1

You need to set the AssemblyTitle in AssemblyInfo.cs. After doing this you may need to remove all the registry entries and re-install your aplication.

(so other people with the same problem don't need to search through the comment thread)

ForbesLindesay
  • 10,482
  • 3
  • 47
  • 74