Main
This commit is contained in:
50
Start_GUI_AutoAll.bat
Normal file
50
Start_GUI_AutoAll.bat
Normal file
@@ -0,0 +1,50 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set "VERZ=%~dp0"
|
||||
set "computer_list=%VERZ%rechner.txt"
|
||||
set "logdir=%VERZ%LOGS"
|
||||
|
||||
if not exist "%logdir%" mkdir "%logdir%"
|
||||
|
||||
:START
|
||||
for /F "usebackq delims=" %%c in ("%computer_list%") do (
|
||||
echo ------------------------------
|
||||
echo Processing: %%c
|
||||
|
||||
rem kurz pingen, Ausgabe unterdr<64>cken
|
||||
ping -n 1 %%c >nul 2>&1
|
||||
|
||||
rem wenn ping fehlschl<68>gt (errorlevel >= 1)
|
||||
if errorlevel 1 (
|
||||
echo %%c>> "%logdir%\rechnerNo_Ping.log"
|
||||
if exist "\\%%c\c$\FFUP1.log" (
|
||||
echo %%c>> "%logdir%\FFUPIDA.log"
|
||||
)
|
||||
) else (
|
||||
rem ping erfolgreich -> kleinen Delay damit SMB reagieren kann
|
||||
timeout /t 2 /nobreak >nul
|
||||
|
||||
rem zus<75>tzliche <20>berpr<70>fung: ist der Admin-Share erreichbar?
|
||||
if exist "\\%%c\c$\Windows\write.exe" (
|
||||
rem Share erreichbar -> weiterarbeiten
|
||||
echo Admin-Share erreichbar bei %%c
|
||||
rem nur kopieren, wenn Zieldatei nicht existiert
|
||||
if not exist "\\%%c\c$\FFUP1.log" (
|
||||
echo Kopiere FFUP.log zu %%c ...
|
||||
mkdir "\\%%c\c$\temp\Sourcen" 2>nul
|
||||
robocopy "%VERZ%Sourcen" "\\%%c\c$\Temp" /mir
|
||||
copy "%VERZ%FFUP.log" "\\%%c\c$\FFUP1.log" >nul
|
||||
start "" psexec.exe -s \\%%c "c:\temp\startFUP.cmd" -f >> "%logdir%\Error.log"
|
||||
) else (
|
||||
echo FFUP1.log existiert bereits auf %%c
|
||||
)
|
||||
) else (
|
||||
rem Admin-Share nicht erreichbar trotz ping -> loggen
|
||||
echo %%c>> "%logdir%\no_admin_share.log"
|
||||
echo Admin-Share nicht erreichbar bei %%c
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
goto START
|
||||
Reference in New Issue
Block a user