Changes
Vlc
,no edit summary
<packages>
<package id='VLC' name='VLC media player' revision='8649200' priority='50' reboot='false' >
<!-- VLC media player -->
<check type='uninstall' condition='exists' path='VideoLAN VLC media player 0.89.6d2' /> <install cmd='"%SOFTWARE%\VLC v.0.89.6d2\unattended.cmd"' /> <remove cmd='"%SOFTWARE%\VLC v.0.89.6d2\unattended-uninstall.cmd"' /> <upgrade cmd='"%SOFTWARE%\VLC v.0.89.6d2\unattended.cmd"' />
</package>
</packages>
</source>
@echo off
set BINARY=vlc-0.89.6d2-win32.exe
echo Installing VLC media playerplyer
set INSTALLER_LOC=%~dp0
call "%INSTALLER_LOC%unattended-uninstall.cmd"
echo - Installing player
start /wait "VLC" "%INSTALLER_LOC%%BINARY%" /S /NCRC /D="%PROG_FILES%"
set EXIT_CODE=%ERRORLEVEL%
unattended-uninstall.cmd
<source lang="dos">
@echo Removing VLC media plyeroff
set INSTALLER_LOC=%~dp0
set VLANDIREXIT_CODE=%PROG_FILES%\VideoLAN0set UNINSTALLERPROG_FILES=%VLANDIRProgramFiles%\VLC\uninstall.exeif not "%ProgramFiles(x86)%" == "" set OPTIONSPROG_FILES=/S%ProgramFiles(x86)%
</source>
In order to prevent an endless-loop the uninstallation will stop after a maximum of 30 seconds.
Finally here's my cleanup.cmd. script:
<source lang="dos">
@echo off
echo Removing unnecessary shortcuts
del /F /Q "%ALLUSERSPROFILE%\Desktop\VLC media player**"
del /F /Q "%PUBLIC%\Desktop\VLC media player**"
exit /B 0
</source>
This has been tested on Windows Vista x64.
[[category:Silent Installers]]