Click here to Skip to main content
15,886,786 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everyone
i create a jpg file type in file type section my setup
but when i install my application , picassa aplication in default for opennig jpeg file and my application just vew in open with right click menu
how can i set default my application for jpg file type
thank you
Posted

Start with learning the parts of the system Registry responsible for associations between file types and default applications registered to work with those file type. This is a pretty easy topic:

http://msdn.microsoft.com/en-us/library/windows/desktop/cc144158%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144160%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144154%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144156%28v=vs.85%29.aspx[^].

When this is clear, develop your code for creating an association in .NET. All you need is using the class Microsoft.Win32.Registry and related type like Microsoft.Win32.RegistryKey and Microsoft.Win32.RegistryValueKind; please see:
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx[^],
http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.aspx[^],
http://msdn.microsoft.com/en-us/library/microsoft.win32.registryvaluekind.aspx[^].

—SA
 
Share this answer
 
v2
Hi,

Through registry entry you can do this.

Here is the link to change Open With option.

Given example is for .pdc extension. you can do the same for .jpeg file extension.

And hope you know how to modify registry value through C# code.

hope this may help you.


Thanks
-Amit.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900