
please wait
|
|
Command = "\"C:\\Program Files\\Windows Media Player\\wmplayer.exe\" /play \"C:\\Users\Seamus\\My Music\\Nightmare\\Welcome To The Family\"";
Just tried on my PC and wmplayer.exe isn't on the path. So you'll either have provide the full path, or modify the path (using the WinAPI functions GetEnvironmentVariable/SetEnvironmentVariable. or the CRT equivalents getenv/setenv. with "PATH".) You could read the install location out of the registry key = HKLM\SOFTWARE\Microsoft\MediaPlayer value = Installation Directory (or Installation DirectoryLFN, for expanded path) Andy PS This post suggests you should check for presence of Media Player by checking its install key key = HKLM\Software\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95} value = IsInstalled If Media Player is installed, this is value is set to 1 Programmatically detect if Windows Media Player is installed http://stackoverflow.com/questions/4035494/programmatically-detect-if-windows-media-player-is-installed |
"wmplayer /play file"
|
|
What is MPLAYER2.EXE? This is a small utility that wraps the full player features (wmplayer.exe) within a small useful application. It it shipped with all version of media player, so you can be certain that it will be on the end users system when launched. |
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\mplayer2.exe] @ = "%ProgramFiles%\Windows Media Player\wmplayer.exe" Path = "%ProgramFiles%\Windows Media Player" |