[wpkg-users] WPKG-Hostlogs after Update to V. 1.1.2 and Client V. 1.3.9
Pendl Stefan
stefan.pendl at haidlmair.at
Tue Oct 6 15:09:58 CEST 2009
>
> cmd.exe does not understand UNC paths. When you use the copy command,
> you must have drive letters on both the source and the destination.
> Alternatively, use Powershell instead of cmd.exe
>
> Hans-Werner Friedemann wrote:
> > Hi @ all
> >
> > after the Update to V. 1.1.2 and Client V. 1.3.9 the
> following script
> > doesn´t work:
> >
---snip
> >
> > Exit code returned non-successful value (1) on command 'cmd
> /C copy /Y
> > "%SYSTEMROOT%\system32\wpkg.xml"
> > "\\server5\hostlogs\%COMPUTERNAME%-wpkg.xml"'.
> >
> > Can you helb me to solve the problem?
> >
In the WPKG Client I have defined the following on the "Variables,Actions" => "Additional Actions".
"Execute Before":
\\server\share\WPKG Server\tools\WPKGclearLog.bat
"Execute After":
\\server\share\WPKG Server\tools\WPKGclientCollect.bat
----
The WPKGclearLog.bat contains:
Rem ---code start (watch for line wraps)
echo %DATE% %TIME% ERROR : WPKG did not finish successfully! >"%SOFTWARE%\ClientLogs\%COMPUTERNAME%.log"
REM ---code end
The WPKGclientCollect.bat contains:
Rem ---code start (watch for line wraps)
set script_name=%~n0
echo %DATE% %TIME% INFO : WPKG successfully finished! >"%SOFTWARE%\ClientLogs\%COMPUTERNAME%.log"
echo SOFTWARE ... %SOFTWARE% >"%TMP%\%script_name%.log"
echo WPKG_ROOT ... %WPKG_ROOT% >>"%TMP%\%script_name%.log"
if exist "%TMP%\wpkg-%COMPUTERNAME%.log" copy /Y "%TMP%\wpkg-%COMPUTERNAME%.log" "%SOFTWARE%\ClientLogs\%COMPUTERNAME%.log" >>"%TMP%\%script_name%.log"
if exist "%SystemRoot%\system32\wpkg.xml" copy /Y "%SystemRoot%\system32\wpkg.xml" "%WPKG_ROOT%\status\%COMPUTERNAME%.xml" >>"%TMP%\%script_name%.log"
REM ---code end
----
The first script clears the server side log file, so I know if the WPKG process did not finish successfully.
The second script replaces the server side log with a success message or the log, if it was created due to changes.
---
Stefan
More information about the wpkg-users
mailing list