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