PC Review


Reply
Thread Tools Rate Thread

How to determine application to launch

 
 
=?Utf-8?B?a2lyc3R5dHJpZ2c=?=
Guest
Posts: n/a
 
      7th Nov 2005
How can I determine the correct type of application to launch from a file
extension, in C#?

I would prefer not to have to get a user to find the application executable.
 
Reply With Quote
 
 
 
 
Lloyd Dupont
Guest
Posts: n/a
 
      7th Nov 2005
using System.Diagnostic;

//.....

ProcessStartInfo psi = new ProcessStartInfo("some document file or url or
whatever");
psi.UseShellExecute = true;
Process.Start(psi);

"kirstytrigg" <(E-Mail Removed)> wrote in message
news:FEC82E3B-D584-48C7-BE4B-(E-Mail Removed)...
> How can I determine the correct type of application to launch from a file
> extension, in C#?
>
> I would prefer not to have to get a user to find the application
> executable.



 
Reply With Quote
 
Siva M
Guest
Posts: n/a
 
      8th Nov 2005
Just do a Process.Start ("file name"). This will open the associated
application.

"kirstytrigg" <(E-Mail Removed)> wrote in message
news:FEC82E3B-D584-48C7-BE4B-(E-Mail Removed)...
How can I determine the correct type of application to launch from a file
extension, in C#?

I would prefer not to have to get a user to find the application executable.


 
Reply With Quote
 
=?Utf-8?B?a2lyc3R5dHJpZ2c=?=
Guest
Posts: n/a
 
      8th Nov 2005
Thanks a lot guys.

I feel mightily stupid not thinking of this )

"Siva M" wrote:

> Just do a Process.Start ("file name"). This will open the associated
> application.
>
> "kirstytrigg" <(E-Mail Removed)> wrote in message
> news:FEC82E3B-D584-48C7-BE4B-(E-Mail Removed)...
> How can I determine the correct type of application to launch from a file
> extension, in C#?
>
> I would prefer not to have to get a user to find the application executable.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to launch a Windows application from a ASP.Net web application JB Microsoft ASP .NET 6 6th Oct 2010 02:33 PM
Launch External Application and Close main UI Application - VS 200 Ryan Microsoft VB .NET 2 11th Feb 2010 09:34 PM
Determine the default mime handler for a file type then launch thathandler LordHog Microsoft C# .NET 3 31st Jul 2008 09:28 PM
Launch another application from within C# Winforms application GrantS Microsoft C# .NET 5 6th Dec 2004 01:27 AM
Launch an imaging application within Windows forms application =?Utf-8?B?VkIgVXNlcg==?= Microsoft VB .NET 4 23rd Nov 2004 04:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:44 PM.