Logs pusher for WPKG on iPasserelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
623 B

@echo off
CALL %~dp0\..\conf\sync_conf.bat
SET DRIVE=unknown
FOR %%D IN (e f g h i j k l m n o p q r s t u v w x y z) do (
cd %%D:
IF ERRORLEVEL 1 SET DRIVE=%%D
IF ERRORLEVEL 1 goto :drivefound
)
goto :EOF
:drivefound
net use %DRIVE%: %LOGS% /USER:%USER% %PASS% 1>NUL 2>NUL
IF %ERRORLEVEL% NEQ 0 goto :EOF
IF NOT EXIST "%DRIVE%\logs" mkdir "%DRIVE%\logs"
IF NOT EXIST "%DRIVE%\databases" mkdir "%DRIVE%\databases"
copy /Y "%SYSTEMROOT%\system32\wpkg.xml" "%DRIVE%\databases\%COMPUTERNAME%.xml"
copy /Y "%TEMP%\wpkg-%COMPUTERNAME%.log" "%DRIVE%\logs\%COMPUTERNAME%.log"
net use /D %DRIVE%