<tt><font size=2>> <br>
> ..., because there is always something missing from the log on the
<br>
> server, if it is done by a package.<br>
> <br>
> It is best to do it after WPKG.js is called, which can be accomplished
<br>
> by a post action in WPKG client or a line in the batch file executing
<br>
> WPKG.js<br>
</font></tt>
<br>
<br><tt><font size=2>I've done this inside of WPKG - the trick is to spawn
the package process (on execute='changed' in my case), let wpkg continue
and the spawned process waits for wpkg to end and only then touches the
log</font></tt>
<br>
<br><tt><font size=2>this combination will ftp the log to the server only
if an error is logged:</font></tt>
<br>
<br><tt><font size=2><package id='reporterror'</font></tt>
<br><tt><font size=2>        name='Report Packaging
Errors'</font></tt>
<br><tt><font size=2>        revision='4'</font></tt>
<br><tt><font size=2>        priority='0'</font></tt>
<br><tt><font size=2>        execute='changed'></font></tt>
<br><tt><font size=2>        </font></tt>
<br><tt><font size=2>        </font></tt>
<br><tt><font size=2>        <install cmd='"%TOOLDIR%\curl.exe"
-f -s </font></tt><a href=http://wpkg/wpkg/scripts/reporterrors.cmd><tt><font size=2>http://wpkg/wpkg/scripts/reporterrors.cmd</font></tt></a><tt><font size=2>
-o "%TOOLDIR%\reporterrors.cmd"'></font></tt>
<br><tt><font size=2>           
    <condition></font></tt>
<br><tt><font size=2>           
            <check type='logical'
condition='not'></font></tt>
<br><tt><font size=2>           
               
    <check type='file' condition='sizeequals' path='%TOOLDIR%\reporterrors.cmd'
value='324' /></font></tt>
<br><tt><font size=2>           
            </check></font></tt>
<br><tt><font size=2>           
    </condition></font></tt>
<br><tt><font size=2>        </install></font></tt>
<br><tt><font size=2>        </font></tt>
<br><tt><font size=2>        <install cmd='"%COMSPEC%"
/C start "reporterrors" "%COMSPEC%" /C "%TOOLDIR%\reporterrors.cmd"'/></font></tt>
<br>
<br><tt><font size=2>        <upgrade include='install'/></font></tt>
<br><tt><font size=2></package></font></tt>
<br>
<br><tt><font size=2>with reporterrors.cmd being this:</font></tt>
<br><tt><font size=2>---</font></tt>
<br><tt><font size=2>goto test</font></tt>
<br><tt><font size=2>:wait</font></tt>
<br><tt><font size=2>ping localhost</font></tt>
<br><tt><font size=2>:test</font></tt>
<br><tt><font size=2>reg query HKEY_LOCAL_MACHINE\SOFTWARE\WPKG /v running
| find "true"</font></tt>
<br><tt><font size=2>if %ERRORLEVEL% EQU 0 goto wait</font></tt>
<br>
<br><tt><font size=2>FIND "ERROR" "%TEMP%\wpkg-%COMPUTERNAME%.log"</font></tt>
<br><tt><font size=2>if %ERRORLEVEL% NEQ 0 goto end</font></tt>
<br>
<br><tt><font size=2>"%~dp0\curl.exe" -f -s </font></tt><a href="ftp://wpkg/wpkg-log/"><tt><font size=2>ftp://wpkg/wpkg-log/</font></tt></a><tt><font size=2>
-T "%TEMP%\wpkg-%COMPUTERNAME%.log"</font></tt>
<br>
<br><tt><font size=2>:end</font></tt>
<br><tt><font size=2>---</font></tt>
<br>
<br>