116 lines
5.0 KiB
Batchfile
116 lines
5.0 KiB
Batchfile
@echo off
|
||
::
|
||
::
|
||
:start
|
||
cls
|
||
set VERZ=%~dp0
|
||
color 0f
|
||
echo -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
|
||
echo -* *-
|
||
echo -* User:%USERNAME% *-
|
||
echo ** **
|
||
echo ** **
|
||
echo ** **
|
||
echo ** **
|
||
echo ** **
|
||
echo ** **
|
||
echo ** **
|
||
echo ** **
|
||
echo ** - Powershell - **
|
||
echo ** ==================== **
|
||
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||
echo ** **
|
||
echo * - M-E-N-U-E - *
|
||
echo ** ______________ **
|
||
echo ** **
|
||
echo ** 1.)= Powershell **
|
||
echo ** ----------------- **
|
||
echo ** 2.)= **
|
||
echo ** --------------------- **
|
||
echo ** 3.)= **
|
||
echo ** _____________ **
|
||
echo ***-----------------------------------------------------------***
|
||
echo * *
|
||
echo * *
|
||
echo * *
|
||
echo *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||
echo.
|
||
set /p Rechnername= Bitte CLIENT-ID / Hostnamen eingeben :
|
||
|
||
::Pr<50>fen, ob Rechner anpingbar ist.
|
||
ping %Rechnername% -n 1
|
||
|
||
IF NOT %ERRORLEVEL%==0 echo ***** ACHTUNG: Rechner konnte nicht angepingt werden
|
||
IF NOT %ERRORLEVEL%==0 set ERRORLEVEL=2 & goto eof
|
||
|
||
|
||
|
||
set /p Reparatur=Bitte waehlen Sie eine Option aus:
|
||
echo ==============================================
|
||
if "%Reparatur%"=="1" set RepInfo="Power"
|
||
if "%Reparatur%"=="2" set RepInfo="Leer"
|
||
if "%Reparatur%"=="0" set RepInfo="neue Eingabe"
|
||
|
||
set geraeteTyp=%Rechnername:~6,1%
|
||
|
||
|
||
echo -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
|
||
echo ** **
|
||
echo ** Rechnername: %Rechnername% **
|
||
echo ** **
|
||
echo ** Geraetetyp: %geraeteTyp% **
|
||
echo ** (C= Client) **
|
||
echo ** (L= Laptop) **
|
||
echo ** **
|
||
echo ** Betriebsystem: Windows -%bitVersion%bit **
|
||
echo ** **
|
||
echo ** Auswahl war:%RepInfo% **
|
||
echo ** **
|
||
echo -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
|
||
echo.
|
||
|
||
goto init
|
||
|
||
goto eof
|
||
|
||
:init
|
||
|
||
if "%Reparatur%"=="1" goto Power
|
||
if "%Reparatur%"=="2" goto 22
|
||
|
||
goto eof
|
||
|
||
:Power
|
||
echo *******************************************************************************
|
||
echo ***** ********
|
||
echo *******************************************************************************
|
||
echo ***** ...Bitte warten, Power wird durchgef<65>hrt.... ********
|
||
echo *******************************************************************************
|
||
robocopy "%VERZ%\source" "\\%Rechnername%\c$\Temp\Power" /mir
|
||
::robocopy "%VERZ%\SCCM_Client" "\\%Rechnername%\c$\Temp" /mir
|
||
psexec \\%Rechnername% -s "c:\temp\Power\_install.cmd" -f
|
||
goto eof
|
||
|
||
|
||
:22
|
||
echo *******************************************************************************
|
||
echo ***** 222222222222222222 ********
|
||
echo *******************************************************************************
|
||
echo ***** ...Bitte warten, Installation wird durchgef<65>hrt.... ********
|
||
echo *******************************************************************************
|
||
|
||
goto eof
|
||
|
||
|
||
|
||
:eof
|
||
if "%errorlevel%"=="0" color 02 & goto farbegesetzt
|
||
if "%errorlevel%"=="1" (color 02) else (color 0c)
|
||
:farbegesetzt
|
||
|
||
echo ****************************************************************************
|
||
echo ***** AKTIVIERUNG Abgeschlossen - Error Code beachten! ***
|
||
echo ****************************************************************************
|
||
pause
|
||
cls
|
||
goto start |