WMP with command line

Posted on 2005-03-08
Medium Priority
Last Modified: 2010-04-16

i'm trying to launch windows media player (10) with a command line.
the result is always "the system cannot find the file specified.
the code:

                        string strCmdLine = "C:\\Program Files\\Windows Media Player\\wmplayer.exe /play /fullscreen c:\\Castaway.mp3";
                  catch(Exception ex)

i double checked and the file is there, what's wrong?
Question by:sedgwick
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 48

Accepted Solution

AlexFM earned 100 total points
ID: 13485530
Try this:

string s1 = "C:\\Program Files\\Windows Media Player\\wmplayer.exe";
string s2 = "/play /fullscreen c:\\Castaway.mp3";

Process.Start(s1, s2);
LVL 42

Author Comment

ID: 13494385

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question