Changes

Jump to: navigation, search

Media Player Classic - Homecinema

2,552 bytes added, 16:42, 14 June 2011
Add a package definition for the installer version and some tips on file associations and playing DVDs
Silent installer for [http://mpc-hc.sourceforge.net/ Media Player Classic - Homecinema] (MPC-HC) - an open source (GPL) media player and the successor to [[Media Player Classic]].
 
= Installer Version =
 
The silent uninstall mode is broken because it asks if you want to remove settings. Unregister all file associations, delete the program folder and remove the registry entry as a workaround.
 
<source lang="xml">
<package
id="mpc-hc"
name="Media Player Classic - Home Cinema"
revision="%version%"
reboot="false"
priority="50">
 
<variable name="version" value="1.5.0.2827" />
 
<check type="uninstall" condition="exists" path="Media Player Classic - Home Cinema v%version%" />
 
<install cmd='"%SOFTWARE%\mpc-hc\MPC-HomeCinema.%version%.x86.exe" /silent' />
<install cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\mpc-hc.exe" /regvid' />
<install cmd='%COMSPEC% /c reg add "HKCR\DVD\shell\play\command" /ve /d "\"C:\Program Files\Media Player Classic - Home Cinema\mpc-hc.exe\" \"%L\"" /f' />
 
<upgrade cmd='"%SOFTWARE%\mpc-hc\MPC-HomeCinema.%version%.x86.exe" /silent' />
<upgrade cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\mpc-hc.exe" /regvid' />
<upgrade cmd='%COMSPEC% /c reg add "HKCR\DVD\shell\play\command" /ve /d "\"C:\Program Files\Media Player Classic - Home Cinema\mpc-hc.exe\" \"%L\"" /f' />
 
<!-- silent uninstall is unusable since it asks if you want to remove settings -->
<!-- <remove cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\unins000.exe" /verysilent' /> -->
<remove cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\mpc-hc.exe" /unregall' />
<remove cmd='%COMSPEC% /C del /f /q "%PROGRAMFILES%\Media Player Classic - Home Cinema"' />
<remove cmd='%COMSPEC% /C reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2624B969-7135-4EB1-B0F6-2D8C397B45F7}_is1" /va /f' />
</package>
</source>
 
== Registering File Associations ==
 
Use the command line switches /regaud and /regvid to to register the file type associations for audio and video files. Use /unregall to remove all file associations. See mpc-hc.exe /? for all of the command line switches.
 
<source lang="xml">
<install cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\mpc-hc.exe" /regvid' />
<upgrade cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\mpc-hc.exe" /regvid' />
<remove cmd='"%PROGRAMFILES%\Media Player Classic - Home Cinema\mpc-hc.exe" /unregall' />
</source>
 
== Playing DVDs ==
 
I had trouble getting MPC-HC to play DVDs from Windows Explorer. This registry changes seems to work on XP.
 
<source lang="xml">
<install cmd='%COMSPEC% /c reg add "HKCR\DVD\shell\play\command" /ve /d "\"C:\Program Files\Media Player Classic - Home Cinema\mpc-hc.exe\" \"%L\"" /f' />
</source>
 
= Standalone Version =
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package id="mpc-hc"
name="Media Player Classic - Home Cinema" revision="20081129" reboot="false" priority="0"> <check type="file" condition="exists" path="%PROGRAMFILES%\mpc-hc\mplayerc.exe" /> <install cmd='%SOFTWARE%\mpc-hc\install.bat' /> <remove cmd='%SOFTWARE%\mpc-hc\remove.bat' /> <upgrade cmd='%SOFTWARE%\mpc-hc\remove.bat' /> <upgrade cmd='%SOFTWARE%\mpc-hc\install.bat' />
</package>
</packages>
</source>
117
edits

Navigation menu