473,394 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

resolve launch application to file extension from registry using C#?

When a user double clicks on file item in Windows Explorer, Windows
tries to open the document with whatever application is related to
it's file extension.

In my WinForms application I would like to be able to shell out and
launch referenced applications in this way (to simplify what I'm
trying to accomplish, let's say I'm trying to create a Windows
Explorer like application using WinForms and C# for .NET 2.0

What's the best way to go about resolving the appropriate launch
application to the document file extension? Is there a location in the
registry I can check?

Thanks.

Feb 8 '07 #1
2 6067
I discovered this is not necessary, turns on Process.Start handles it
for you:

E.g.
System.Diagnostics.Process.Start("c:\myfile.doc")

On Feb 8, 9:51 am, "JDeats" <Jeremy.De...@gmail.comwrote:
When a user double clicks on file item in Windows Explorer, Windows
tries to open the document with whatever application is related to
it's file extension.

In my WinForms application I would like to be able to shell out and
launch referenced applications in this way (to simplify what I'm
trying to accomplish, let's say I'm trying to create a Windows
Explorer like application using WinForms and C# for .NET 2.0

What's the best way to go about resolving the appropriate launch
application to the document file extension? Is there a location in the
registry I can check?

Thanks.

Feb 8 '07 #2
Thanks for the answer to yourself, I need exactly that information!

On 8 Feb., 21:00, "JDeats" <Jeremy.De...@gmail.comwrote:
I discovered this is not necessary, turns on Process.Start handles it
for you:

E.g.
System.Diagnostics.Process.Start("c:\myfile.doc")

On Feb 8, 9:51 am, "JDeats" <Jeremy.De...@gmail.comwrote:
When a user double clicks on file item in Windows Explorer, Windows
tries to open the document with whatever application is related to
it's file extension.
In my WinForms application I would like to be able to shell out and
launch referenced applications in this way (to simplify what I'm
trying to accomplish, let's say I'm trying to create a Windows
Explorer like application using WinForms and C# for .NET 2.0
What's the best way to go about resolving the appropriate launch
application to the document file extension? Is there a location in the
registry I can check?
Thanks.

Feb 14 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ashok | last post by:
hi, i want to know how to make a specific type of file open in an application i developed in python when the user clicks on the file.(in windows) for eg. a .txt file when clicked opens in notepad,...
8
by: Dutchy | last post by:
Dear reader, In an attempt to obtain the path to the quick-launch-folder in order to create a shortcut to my application-updates during installation , I thought to: 1- check if quick launch...
6
by: Jesper. | last post by:
Know of any good tutorials to demonstrate how to assign a file extension to an applicatiand and how to open the file in the application when you doubleclick on the file in the OS brgds Jesper.
13
by: David Rose | last post by:
Hi, I am trying to launch pdf files (in this case). The test application takes the path to the pdf from a TextBox when the user clicks a button. I have written code that works on my computer,...
5
by: GrantS | last post by:
Hi I am trying to use ShellExecute to launch an application to display a certain file. The variation on the theme is that I need to be able to specify the application to launch and not simply...
7
by: Steve | last post by:
I used System.Diagnostics.Process.Start(str) to launch application. str is based on the registry setting, in registry, it might be str = rundll32.exe...
8
by: Paul | last post by:
I have looked and looked for this info. All the I/O examples I've found either explicity use a file name or use the OpenFileDialog. When you drag a MS Word document over MS Word, it launches and...
2
by: Peter Ignarson | last post by:
Hi there - I am writing a paint program (I am following a learning tutorial, there is no point to writing a paint program) and I want to extend it so that I can copy the contents of my drawing and...
5
by: jmsxp | last post by:
Hi all, I am in my infancy with programming, so please forgive stupid questions... I am attempting to write a C# program that will launch Trillian (well, that is just a part of the overall...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.