By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,976 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,976 IT Pros & Developers. It's quick & easy.

C# equivalent of shell command

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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" <pa**********@hotmail.com>
| 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: <uE**************@TK2MSFTNGP12.phx.gbl>
| 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!TK2MSFTN GP12.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
|
|
|

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.