[wpkg-users] remove checks too quickly

heiko.helmle at horiba.com heiko.helmle at horiba.com
Tue Apr 17 08:16:40 CEST 2012


> 
> using the foobar2000 package from the wiki (http://wpkg.org/Foobar2000) 
> I had a strange problem. After removing the package from the profile, 
> wpkg.js reported that the package could not be removed. But all the 
> files were uninstalled corectly when I checked in explorer. It took me a 

> while to find out that wpkg.js would check too quickly before the system 

> had actually erased the files (probably because the uninstaller process 
> would return too quickly) . So I added a new remove command right after 
> the actual command which would just silently ping some machine and the 
> remove succeeded... is this a known issue or is there some setting I can 

> change to make wpkg wait a second or two before checking?
> 

Waiting a few seconds is easy, but is asking for error on slower systems.

Better find out what the uninstaller process name is and use a script like 
this:

--- waitforprocess.cmd ---
@echo off

:loop

tasklist /FI "IMAGENAME eq %1" | find /I /N "%1" > /NUL
if not "%ERRORLEVEL%"=="0" goto end

REM There's no sleep in a command script... this is one ugly solution...
ping 127.0.0.1 -n 5 > NUL

goto loop

:end
---

Best Regards
        Heiko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120417/14c41d75/attachment-0002.html>


More information about the wpkg-users mailing list