577
edits
Changes
Vlc
,various small tidyups
[http://www.videolan.org/vlc/ VLC] (Video LAN VideoLAN Client) is a multimedia (audio and video) player.
== Simple method Method ==
<source lang="xml">
<package
id="vlc"
name="Video LAN VideoLAN Client"
revision="1"
reboot="false"
VLC is a bit tricky because upgrading (installation if an installed version is already installed) is not fully unattended. It interactively asks the user if the existing version should be uninstalled first. As already mentioned above a solution would be to remove the previous version first before installing the VLC update. However also this fails since uninstall.exe forks a new process while the parent exits immediately. So if this happens too quickly then the install program still asks for confirmation.
So I did a small workaround for that:
<source lang="xml">
<?xml version="1.0" encoding="utf-8" ?>
<packages>
<package id='VLC' name='VLC media playerVideoLAN Client' revision='92001' priority='50' reboot='false' >
<!-- VLC media player -->
<check type='uninstall' condition='exists' path='VLC media player 0.9.26' />
<install cmd='"%SOFTWARE%\VLC\unattended.cmd"' />
<remove cmd='"%SOFTWARE%\VLC\unattended-uninstall.cmd"' />
</source>
<source lang="dos">
@echo off
set BINARY=vlc-0.9.46-win32.exe
echo Installing VLC media plyer
</source>
As you can see it calls unattended-uninstall.cmd prior to installation (any time!). The evaluation of PROG_FILES assures that it installs the 32-bit VLC player always to the correct program files directory also on 64-bit systems. ===unattended-uninstall.cmd===
<source lang="dos">
@echo off
As this script is called by unattended.cmd also when VLC is probably not installed it first checks if there is an uninstallation to be done. If not it just skips the uninstall, but still checks to see if the uninstaller totally cleaned up after itself.
As I wrote described above the uninstaller forks a child process and exits immediately. So there is a need to wait for the uninstaller to complete. I am simply checking if the uninstaller still exists. If yes I wait for another second.
In order to prevent an endless-loop the uninstallation will stop after a maximum of 30 seconds.
<source lang="dos">
@echo off