2

Possible Duplicate:
Register file extension in window registry?

I would like to make my program the default program for .txt files when installed. A lot of programs do the same thing, when installing for example a browser, all the html files get the program's icon and if opened, the program opens, without needing the user to set it as default program. How can I do that? And also for the icon, microsoft word for example uses a different icon for the program and for the files. How can I do that? Thanks!

Community
  • 1
  • 1
Cippo
  • 1,001
  • 4
  • 14
  • 26
  • I don't know the exact entry, but what you are wanting is going require a registry entry. – aserwin Sep 27 '12 at 15:54
  • 3
    possible [duplicate](http://stackoverflow.com/q/7789319/944681) of [duplicate](http://stackoverflow.com/q/1720710/944681) :) – Michal Klouda Sep 27 '12 at 15:54

2 Answers2

1

You should edit your registry: e.g.

Or you should create an installer project and set the appropriate configuration.

Istvan Neuwirth
  • 378
  • 2
  • 4
1

Microsoft has this on implementing a custom file format (including other ways to integrate with the shell).

Because you want to associate your application with an extension that is already associated with another application you will have to study the section about public and private file types.

Martin Liversage
  • 104,481
  • 22
  • 209
  • 256