Wednesday, August 19, 2009

Media Player Classic Rollout

We just solved a problem a customer had with media playback using Windows Media Player (WMP).

Basically there were two problems associated with WMP: First, several users complained that opening a file with WMP takes a long time. Secondly, a lot of users were confused by all the controls WMP offers and asked how to “clean” the interface. The help desk database showed that about 130 tickets were created about these issues in the last three months.

Our first idea was to see if we could solve this problem with registry settings and/or GPO settings. However, I personally didn’t use WMP for several years now; I always use Media Player Classic (MPC). Showing Media Player Classic the users that reported one of these issues the most resulted in one reaction: “Great. Exactly what I need”. If you do not quite understand what the user means, here’s an example of the interface difference between WMP and MPC:


Sure thing, this means we will roll out MPC to 550+ computers! A very important requirement of this rollout was that the changes could be reverted back easily. As Microsoft is constantly updating WMP, it might happen that a new version brings back a “clean” interface and is faster. At that time, MPC would be replaced by WMP again.

Therefore, we have created some .REG files and some .BAT files that install MPC. These scripts will then be executed by the computer management solution of the customer.

The first thing is to download MPC from, and copying these files to Program Files folder.

md "%programfiles%\Media Player Classic\"

copy S:\soft\MPC\MPC_prog\*.* "%programfiles%\Media Player Classic" /V /Y

After that, Windows should know that a new program is available so we’ll add MPC to the “Applications” list by using this .REG file (simply import this file with the command regedit.exe /S app.reg)


@="Media Player Classic"
"FriendlyAppName"="Media Player Classic"




@="mplayerc.exe \"%L\""


@="mplayerc.exe \"%L\""


After this, users can already right click any supported file type, select “Open with..” and choose “Media Player Classic”. However, when doing so this won’t work because Windows does not know where the file “mplayerc.exe” is. This REG file will help Windows to locate it:


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\mplayerc.exe]
@="C:\\Program Files\\Media Player Classic\\mplayerc.exe"
"Path"="C:\\Program Files\\Media Player Classic\\"

Although it is of course possible to include the complete path in the first REG, we are using the AppPaths here because this gives us one location where MPLAYERC.exe is located. This will be more important later on.

The next step is to associate the needed files with MPC. As said earlier, we are trying to accomplish this as least changes as possible. Therefore we are simply adding to each file type that should open with MPC, a new command “Play2” and make this command the default. That way, switching back to Windows Media Player just requires changing the default command.

Please note that we are only changing those files that customer is using (often or sometimes) and leaving all other, even if MPC supports them, alone:


; .wav = soundrec (#1)
; default "play"


@="mplayerc.exe \"%L\""

; .mpeg = mpegfile (#2)
; default "play"


@="mplayerc.exe \"%L\""

; .avi = avifile (#3)
; default "play"


@="mplayerc.exe \"%L\""

; .mp3 = mp3file (#4)
; default "play"


@="mplayerc.exe \"%L\""

; .mid = midfile (#5)
; default "play"


@="mplayerc.exe \"%L\""

; .MKV -> Not existsting by default (#6)




@="mplayerc.exe \"%L\""

; .divx = divxFile (#7)
; default "open"


@="mplayerc.exe \"%L\""

; .FLV -> Not existing by default (#8)




@="mplayerc.exe \"%L\""

As you can see, we are reusing the AppPath from above by executing “mplayerc.exe” without any path. If you want to install MPC in a different folder, just change the AppPath and everything else will still work. We simply find that a simpler solution then entering the complete path in every command, although Windows needs some milliseconds more to locate mplayerc.exe.

Once all these REG files have been imported (REGEDIT.EXE /S (SOMETHING).reg), give it a try if all files are opened with MPC as expected. In case you need test files, some very good ones could be found at Fx Sound and Magic.


No comments:

Post a Comment