Hi Cedric,

On 10.01.2012 18:13, Cedric Frayssinet wrote:
I've a little problem with a package. This is a french software, named Risbee :
http://www.pob-technology.com/upload/softwares/risbee-3.1.0-setup.exe

This is a NSIS package, and my classic XML is :

    <package
            id="Risbee"
            name="Risbee - Programmation graphique de robots"
            revision="%version%.1"
            priority="10"
            reboot="false" >

    <variable name="version" value="3.1.0" />

    <check type="uninstall" condition="exists" path="Risbee" />
    <install cmd='"%SOFTWARE%\Risbee\risbee-%version%-setup.exe" /S' />
    <upgrade cmd='"%SOFTWARE%\Risbee\risbee-%version%-setup.exe" /S' />
    <remove cmd='"%PROGRAMFILES%\POB-Technology\Risbee\uninstall.exe" /S' />
    </package>


Install and Upgrade are ok.

Command line for removing is ok (tested manually -> no more Risbee on add/remove
programs-), but my local wpkg.xml is not updated, and package still installed,
so next reboot, installation and remove restart again...

Very likely the uninstall is not really working properly. Check WPKG logs, it's very likely stating that either your remove command did not exit with "success" exit code of 0 or that uninstall value still exists ("failed checking after remove").

There are a couple of possibilities for it:
1. Your uninstall.exe forks a sub-process and does not wait for Risbee to be removed before it exits.

2. Remove does not work properly (e.g. due to PROGRAMFILES not being defined, or on 64-bit edition installation is in %ProgramFiles(x86)% instead).


For the first option (very likely) uninstall.exe terminates before the remove of the uninstall entry takes place, so WPKG runs the check and finds it still installed. People have been reporting that sometimes adding the "_?" parameter works for NSIS uninstaller.

<remove cmd='"%PROGRAMFILES%\POB-Technology\Risbee\uninstall.exe" /S _?="%PROGRAMFILES%\POB-Technology\Risbee"' />

If this does not work, then try uninstalling using the script I've recently 
posted:


@echo off
:: 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)%

::Application install folder
set APP_DIR=%PROGRAM_FILES%\POB-Technology\Risbee

:: 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

if not exist "%UNINSTALLER%" goto good_end
start /wait "Uninstall" "%UNINSTALLER%" %OPTIONS%
start "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



br,
Rainer
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users

Reply via email to