Files
THE-TOOL/SCCMINST/GUI_Soft_Installer.bat
2025-12-14 15:46:14 +01:00

214 lines
8.0 KiB
Batchfile
Raw Permalink Blame History

@echo off
::
::VERSION 27.03.2019
::
:startnew
cls
set Arbeitsverzeichnis=%1"
set Arbeitsverzeichnis=%Arbeitsverzeichnis:"=%
set VERZ=%~dp0
echo ************************************************
echo **************************************************
echo **** ****
echo ** **
echo *** -= Software Inst Tools\ =- ***
echo **** ****
echo *************************************************
echo ********************************************************************
echo ***** -= =- ******
echo *******************************************************************************
echo *******************************************************************************
echo *******************************************************************************
echo ******** ********
echo ******** -= M-E-N-U-E =- ********
echo ******** ********
echo ******** ********
echo ******** ********
echo ******** 1= Cisco Anyconnect 4.7 ********
echo ******** 2= Cisco XML Update ********
echo ******** 3= Powershell 5.1 64 ********
echo ******** 4= Powershell 5.1 32 ********
echo ******** ********
echo *******************************************************************************
echo *****************************************************************************
echo ***************************************************************************
echo.
echo.
echo.
set /p Rechnername= Bitte Rechnernamen/Hostnamen eingeben:
::Pr<50>fen, ob Rechner anpingbar ist.
ping %Rechnername% -n 1
timeout /T 1 > nul
IF NOT %ERRORLEVEL%==0 echo ***** ACHTUNG: Rechner konnte nicht angepingt werden
IF NOT %ERRORLEVEL%==0 set ERRORLEVEL=2 & goto EOF
if NOT exist "\\%Rechnername%\c$\windows\" (echo **** KEIN ZUGRIFF AUF RECHNER & set errorlevel=-1 & goto EOF)
if exist "\\%Rechnername%\c$\windows\SysWOW64\" (set bitVersion=64) else (set bitVersion=32)
echo *******************************************************************************
echo *******************************************************************************
echo ******** Rechnername: %Rechnername%
echo ******** OS: Windows 7 %bitVersion% Bit
echo *******************************************************************************
echo *****************************************************************************
set /p Reparatur=Bitte waehlen Sie eine Option aus:
if "%Reparatur%"=="1" goto rep1
if "%Reparatur%"=="2" goto rep2
if "%Reparatur%"=="3" goto rep3
if "%Reparatur%"=="4" goto rep4
if "%Reparatur%"=="5" goto rep5
if "%Reparatur%"=="6" goto rep6
if "%Reparatur%"=="7" goto rep7
if "%Reparatur%"=="8" goto rep8
if "%Reparatur%"=="9" goto rep9
if "%Reparatur%"=="10" goto rep10
goto EOF
:: **************************************** Rep 1 ****************************************
:rep1
::Kopieren Installdaten
robocopy "%VERZ%\Data\Cisco4.4" "\\%Rechnername%\c$\Temp\Cisco4.4" /mir
echo ******** Installation
::Install
psexec -s \\%Rechnername% "c:\Temp\Cisco4.4\_Install.cmd"
::Loeschen
echo ******** Loeschen Installationsordner
rd "\\%Rechnername%\c$\Temp\Cisco4.4" /s /q
:: ***************************************************************************************
goto EOF
:: ***************************************************************************************
:: **************************************** Rep 2 ****************************************
:rep2
::Kopieren Installdaten
robocopy "%VERZ%\Data\CiscoXML" "\\%Rechnername%\c$\Temp\CiscoXML" /mir
echo ******** Installation
::Install
psexec -s \\%Rechnername% "c:\Temp\CiscoXML\_Install.cmd"
::Loeschen
echo ******** Loeschen Installationsordner
rd "\\%Rechnername%\c$\Temp\CiscoXML" /s /q
:: ***************************************************************************************
goto EOF
:: ***************************************************************************************
:: **************************************** Rep 3 ****************************************
::
:rep3
::Kopieren Installdaten
robocopy "%VERZ%\Data\PS64" "\\%Rechnername%\c$\Temp\PS64" /mir
echo ******** Installation
::Install
psexec -s \\%Rechnername% "c:\Temp\PS64\_Install.cmd"
::Loeschen
echo ******** Loeschen Installationsordner
rd "\\%Rechnername%\c$\Temp\PS64" /s /q
:: ***************************************************************************************
goto EOF
:: ***************************************************************************************
:: **************************************** Rep 4 ****************************************
:rep4
::Kopieren Installdaten
robocopy "%VERZ%\Data\PS32" "\\%Rechnername%\c$\Temp\PS32" /mir
echo ******** Installation
::Install
psexec -s \\%Rechnername% "c:\Temp\PS32\_Install.cmd"
::Loeschen
echo ******** Loeschen Installationsordner
rd "\\%Rechnername%\c$\Temp\PS32" /s /q
:: ***************************************************************************************
goto EOF
:: ***************************************************************************************
:: **************************************** Rep 5 ****************************************
:rep5
::Kopieren Installdaten
robocopy "%VERZ%\Data\TEDatei" "\\%Rechnername%\c$\Temp\TEDatei" /mir
echo ******** Installation
::Install
psexec -s \\%Rechnername% "c:\Temp\TEDatei\setup.msi /i"
::Loeschen
echo ******** Loeschen Installationsordner
rd "\\%Rechnername%\c$\Temp\TEDatei" /s /q
:: ***************************************************************************************
goto EOF
:: ***************************************************************************************
:FEHLER
color 04
echo *******************************************************************************
echo *******************************************************************************
echo ******** Rechner nicht erreichbar ********
echo *******************************************************************************
echo *******************************************************************************
pause
color 07
cls
goto startnew
:: ***************************************************************************************
:EOF
:: ***************************************************************************************
if "%errorlevel%"=="0" color 02 & goto farbegesetzt
if "%errorlevel%"=="1" color 0C & goto farbegesetztF
if "%errorlevel%"=="2" color 0C & goto farbegesetztF
:farbegesetzt
echo *******************************************************************************
echo *******************************************************************************
echo ******** Installation abgeschlossen ********
echo *******************************************************************************
echo *******************************************************************************
pause
color 07
cls
goto startnew
:farbegesetztF
echo *******************************************************************************
echo *******************************************************************************
echo ******** Installation FEHLER ********
echo *******************************************************************************
echo *******************************************************************************
pause
color 07
cls
goto startnew