Pars.Engineer
Pars.Engineer

Reputation: 67

Set Icon on Myfiles with my extension and launch my software

I created a type of file for saving my software information that it has an extension like myfile.xxx But after saving that file is unknown for windows. Anyway, I want to set an icon for files and open my software on a double-click.(Like Microsoft word, photoshop, etc.)

Also I saw this question but it was not useful for me.

Upvotes: 0

Views: 401

Answers (2)

annonymously
annonymously

Reputation: 4708

You need to add a few keys to the registry, if you don't want to do it through an installer:

[HKEY_CLASSES_ROOT\xxxfile]

[HKEY_CLASSES_ROOT\.xxx]
@="xxxfile"

[HKEY_CLASSES_ROOT\xxxfile\DefaultIcon]
@="path_to_your_icon"

[HKEY_CLASSES_ROOT\xxxfile\shell]
[HKEY_CLASSES_ROOT\xxxfile\shell\open]
[HKEY_CLASSES_ROOT\xxxfile\shell\open\command]
@="command_to_run_on_double-click"

How to do this is another matter, most installer packages will have an option to do this for you.

Upvotes: 1

Alexei Levenkov
Alexei Levenkov

Reputation: 100620

You need to register your "file association" appropritely. Check out this question Is there a Windows API to modify file type associations for an extension? and other related question for "file-association" tag.

Upvotes: 0

Related Questions