unknown6656
unknown6656

Reputation: 2963

How do I control the WMP from command line/batch

I am wondering, how I can control the Windows Media Player from the command line or a batch file. With "control" I do not mean open or close the WMP, but 'Skip forwards one title', 'Skip backwards one title', 'pause', 'resume', 'increase volume' and 'decrease volume'.

I've searched already, but the MSDN documentation is not really what I'm searching for :/

Upvotes: 1

Views: 3345

Answers (1)

Ryan Bemrose
Ryan Bemrose

Reputation: 9266

I'm pretty sure you'll have to either write or download a utility to do this. WMP has an object model that you can access via ActiveX or COM if you're willing to do some programming.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd564035%28v=vs.85%29.aspx

For generic operations like play/pause, next track, etc, you can also write a simple program that either sends VK_MEDIA_* keypresses to the WMP window, or simply use SendMessage to send the equivalent WM_APPCOMMAND messages.

Upvotes: 1

Related Questions