C# equivalent of shell command

  • Thread starter Thread starter Paul Speranza
  • Start date Start date
P

Paul Speranza

Does anyone know what the C# equivalent of the shell command is? I want to
play an mp3 file using the users default player.

Regards,
Paul Speranza
 
Hi Paul,

Such like this:

using System;
using System.Diagnostics;

namespace invokemp3
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Process p=new Process();
p.StartInfo.FileName=@"D:\music\Doctor Jones.wma";
p.StartInfo.CreateNoWindow=true;
p.Start();
}
}
}

HTH.
BTW: I love "doctor jones". :)

Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Paul Speranza" <[email protected]>
| Subject: C# equivalent of shell command
| Date: Tue, 19 Aug 2003 22:20:35 -0400
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 12-243-233-123.client.attbi.com 12.243.233.123
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:177584
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Does anyone know what the C# equivalent of the shell command is? I want to
| play an mp3 file using the users default player.
|
| Regards,
| Paul Speranza
|
|
|
 
Back
Top