117 lines
4.7 KiB
Batchfile
117 lines
4.7 KiB
Batchfile
@echo off
|
|
::
|
|
::
|
|
|
|
:start
|
|
cls
|
|
set Arbeitsverzeichnis=%1"
|
|
set Arbeitsverzeichnis=%Arbeitsverzeichnis:"=%
|
|
set VERZ=%~dp0
|
|
color 0f
|
|
echo.
|
|
echo =================================
|
|
echo ****************************************
|
|
echo ** **
|
|
echo ** -= Dateimanager-Installation =- **
|
|
echo ** **
|
|
echo ****************************************
|
|
echo === Systemzeit : %Time% UHR ===
|
|
echo === User : %USERNAME% ===
|
|
echo ********************************************************************
|
|
echo ****** = M-E-N-U-E = ****
|
|
echo *************************************************************************
|
|
echo *****************************************************************************
|
|
echo *******************************************************************************
|
|
echo.
|
|
echo.
|
|
echo.
|
|
set /p RemoteHost=Bitte ClientID "AUDIXXX12345678" eingeben:
|
|
:: Gross kleinschreibung berichtigung
|
|
set RemoteHost=%RemoteHost:a=A%
|
|
set RemoteHost=%RemoteHost:i=I%
|
|
set RemoteHost=%RemoteHost:n=N%
|
|
|
|
|
|
|
|
:: Prüfen, ob Rechner anpingbar ist.
|
|
ping %RemoteHost% -n 1 | find "TTL"
|
|
IF NOT %ERRORLEVEL%==0 echo ***** ACHTUNG: Rechner konnte nicht angepingt werden
|
|
IF NOT %ERRORLEVEL%==0 goto START
|
|
|
|
::if NOT exist "\\%RemoteHost%\c$\windows\" (echo **** KEIN ZUGRIFF AUF RECHNER, ALS ADM GESTARTET? **** & goto EOF)
|
|
::if exist "\\%RemoteHost%\c$\windows\SysWOW64\" (set bitVersion=64) else (set bitVersion=32)
|
|
|
|
|
|
|
|
|
|
:infoausgabe
|
|
echo **************************************************************************
|
|
echo ****************************************************************************
|
|
echo ***** *****
|
|
echo ***** Rechnername: %RemoteHost% *****
|
|
echo ***** ================================= *****
|
|
echo ***** *****
|
|
echo ***** ========================== *****
|
|
echo ***** *****
|
|
echo ****************************************************************************
|
|
echo **************************************************************************
|
|
echo.
|
|
echo.
|
|
echo ***************************************************************************
|
|
echo *****************************************************************************
|
|
echo ***** *****
|
|
echo ***** Installation *****
|
|
echo ***** *****
|
|
echo *****************************************************************************
|
|
echo ***************************************************************************
|
|
echo.
|
|
echo.
|
|
echo.
|
|
|
|
|
|
|
|
copy "%VERZ%\setup.msi" "\\%RemoteHost%\c$\temp\setup.msi"
|
|
copy "%VERZ%\inst.bat" "\\%RemoteHost%\c$\windows\system32\int_proc.bat"
|
|
psexec \\%RemoteHost% -s "int_proc.bat" -f
|
|
del "\\%RemoteHost%\c$\temp\setup.msi
|
|
|
|
|
|
|
|
if "%errorlevel%"=="0" color 02 & goto farbegesetzt
|
|
if "%errorlevel%"=="1" color 0C & goto farbegesetztF
|
|
if "%errorlevel%"=="2" color 0C & goto farbegesetztF
|
|
if "%errorlevel%"=="3" color 0C & goto farbegesetztP
|
|
|
|
|
|
:farbegesetzt
|
|
echo ***************************************************************************
|
|
echo ***************************************************************************
|
|
echo ******** Installation abgeschlossen ********
|
|
echo ***************************************************************************
|
|
echo ***************************************************************************
|
|
pause
|
|
color 07
|
|
cls
|
|
goto start
|
|
|
|
:farbegesetztF
|
|
echo **************************************************************************
|
|
echo **************************************************************************
|
|
echo ******** Installation FEHLER ********
|
|
echo **************************************************************************
|
|
echo **************************************************************************
|
|
pause
|
|
color 07
|
|
cls
|
|
goto start
|
|
|
|
:farbegesetztP
|
|
echo *******************************************************************************
|
|
echo *******************************************************************************
|
|
echo ******** Path Variable fehlerhaft ********
|
|
echo *******************************************************************************
|
|
echo *******************************************************************************
|
|
pause
|
|
color 07
|
|
cls
|
|
goto startnew |