Hi Marco,

Let's first have a look at the VLC issue:

>  2009-06-12 10:07:00, INFO   : Removing Video LAN Client (vlc)...
>  2009-06-12 10:07:00, DEBUG  : Executing command: 
> "%ProgramFiles%\VideoLAN\VLC\uninstall.exe" /S
>  2009-06-12 10:07:02, DEBUG  : Command returned result: 0
>  2009-06-12 10:07:02, DEBUG  : Command in removal of Video LAN Client 
> returned exit code [0]. Success.
>  2009-06-12 10:07:02, DEBUG  : Checking existence of package: Video LAN Client
>  2009-06-12 10:07:02, DEBUG  : Uninstall entry for VLC media player 0.9.9 was 
> found: test successful
>  2009-06-12 10:07:02, DEBUG  : Checking vlc zombie state.
>  2009-06-12 10:07:02, ERROR  : Could not process (remove) Video LAN 
> Client.|Package still installed.
> 
> but the software is not installed, or at least after all the wpkg run
> there's no VLC package in uninstall entry.


This is a well-known issue of the VLC installer and also documented on wpkg.org.
The uninstaller forks a process and then terminates the initial uninstall.exe
immediately. Thus leaving the uninstall entry there. As you can see WPKG reports
that VLC is still installed and therefore enters zombie state (installed but not
assigned to host).

In order to prevent this you need a more smart uninstall command. The script
attached can do that for you. Rename it to unattended-uninstall.cmd, fill in the
values in the header of the file (correct paths) as required and then call this
script instead of the uninstall.exe binary. The script will wait for the
uninstall process to finish its job before it terminates and as a result WPKG
will detect that VLC has been uninstalled properly.



> And note that this is only an example, more packages do this, for
> example:
> 
>  g...@harry:~$ grep "Package still installed" wpkg-carpino.log 
>  2009-06-12 10:06:49, ERROR  : Could not process (remove) Microsoft .NET 
> Framework.|Package still installed.
>  2009-06-12 10:06:54, ERROR  : Could not process (remove) Scratch.|Package 
> still installed.
>  2009-06-12 10:07:00, ERROR  : Could not process (remove) ToolBook 
> Neuron.|Package still installed.
>  2009-06-12 10:07:02, ERROR  : Could not process (remove) Video LAN 
> Client.|Package still installed.
>  2009-06-12 10:07:05, ERROR  : Could not process (remove) Windows Media 
> Player 10.|Package still installed.
> 
> it is only a matter of a badly written recipe? Or i'm missing
> something?


These ones seem to report that uninstall failed. Most probably the checks oyu
defined are still true after uninstall (or you did not specify any appropriate
uninstall command). Make sure the checks will fail after successful uninstall.

br,
Rainer
@echo off

:: This script is an extended uninstaller script for programs which have tricky
:: uninstallers (e.g. VLC media player).
:: It is able to run an uninstaller application and then to monitor if the
:: uninstaller is erased from the system. Depending on the result (either
:: remove completes or timeout occurs) it exits with different ecit code:
:: code 0: all fine, program uninstalled
:: code 1: failed, uninstaller still exissts after timeout


:: This is required to evaluate the target of %ProgramFiles% on 64-bit systems
:: Please note that this is required only if you uninstall a 32-bit application.
set PROGRAM_FILES=%ProgramFiles%
if not "%ProgramFiles(x86)%" == "" set PROGRAM_FILES=%ProgramFiles(x86)%

:: Path where the uninstaller is located
if exist "%PROGRAM_FILES%\VideoLAN\VLC" goto fullProgramFilesDir
if exist "%PROGRAM_FILES%\VideoLAN" goto progFilesVLC
if exist "c:\VideoLAN\VLC" goto rootCVLC
if exist "c:\VideoLAN" goto rootC
echo No VLC instlalation can be found
exit /B 1

:fullProgramFilesDir
set APP_DIR=%PROGRAM_FILES%\VideoLAN\VLC
goto endPathEval

:noSubDir
set APP_DIR=%PROGRAM_FILES%\VideoLAN
goto endPathEval

:rootC
set APP_DIR=c:\VideoLAN
goto endPathEval

:rootCVLC
set APP_DIR=c:\VideoLAN\VLC
goto endPathEval

:endPathEval


:: Path to the uninstaller (see path definition above)
set UNINSTALLER=%APP_DIR%\uninstall.exe

:: Options to be passed to the uninstaller in order to uninstall silently
set OPTIONS=/S


:: ############################################################################
:: No need to change anything below this line (usually ;-))
:: ############################################################################
echo Removing Program

if not exist "%UNINSTALLER%" goto good_end
start /wait "Uninstall" "%UNINSTALLER%" %OPTIONS%
REM Unfortunately the uninstaller seems to fork a child process and the parent
REM process exits immediately. So give it some time to uninstall
for /L %%C IN (1,1,30) DO (
  if not exist "%UNINSTALLER%" goto good_end
  ping -n 2 127.0.0.1 > NUL
)
:bad_end
exit /B 1
 
:good_end
if exist "%APP_DIR%" rmdir /s /q "%APP_DIR%"
exit /B 0
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/wpkg-users

Reply via email to