Click to See Complete Forum and Search --> : Make default file association


raulbolanos
July 1st, 2009, 06:28 AM
Hi guys,

I am facing this trouble.

I have associated some extension to my Application and they work good. The problem comes when I go to one of this files, right click on it, open with, select another application (like note pad) and select the check box "Always use the selected program to open this kind of file".

If I uninstall my program and re-install it again the file association will still be associated with the notepad.

Is there any option within (file types viewer) where I can define my program like Default for my extension? Maybe add an action.

Thank you.

BigEd781
July 1st, 2009, 11:33 AM
http://www.codeproject.com/KB/dotnet/System_File_Association.aspx

If the file type is something that can be opened legitimately by other applications I would suggest asking the user if they would like to associate the file rather then just doing it. Also, you will need Admin privileges to do this on Vista, so best to do it in the installer.

boudino
July 2nd, 2009, 04:09 AM
Do you think the option emphasised in "Open With" dialog (see attachment) accessible trought "Change" button in file types viewr?

BigEd781
July 2nd, 2009, 01:32 PM
@buodino: I am pretty sure that the OP wants to do it programmatically.

boudino
July 3rd, 2009, 03:35 AM
Maybe, but I really wanted to try post an attachment :) But I'll look for coded solution today. :wave: