Skip to content

Running Other applications

Shishir

Asked Dec 23, 2006, 4:19 AM EST3 answers
Share
LinkedInX
I would like to know how can I run a different application form a given application. For example In my program I would like to run the windows media player then how should I go about it? I just want to launch the application.

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    At first you should reference the namespace  System.Diagnostics

    then  using an instance of one method,just like below:
    Process WMP= new Process();
        WMP.StartInfo.FileName   = "WMP.exe";
        WMP.StartInfo.Arguments = "123.mp3"
        WMP.Start();

    You can try, this works for me.
    0
  • 0
    Can you tell me where should be the ".mp3" file. The windows media player is opening but the file cannot be played even when I give the full path of the mp3 file.
    0
  • 0
    .mp3 file is the parameter of the wmp.exe,  you really should indicate the full path for the .mp3 file.but one thing, there should be some "\" characters in the path, which will be treated as ESC, so you should add "@" beofore the path. For example:

    argumets = @"C:\MUSIC\123.MP3"

    hope this can help.
    Good luck
    0