Created
December 2, 2021 15:23
-
-
Save mva-verbit/329c382a08cc16f7d303f72a7551da49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET STATUS=0 | |
SET AWS_STATUS=0 | |
SET SSM_STATUS=0 | |
SET DBEAVER_STATUS=0 | |
SET AWS_CLI_URL=https://awscli.amazonaws.com/AWSCLIV2.msi | |
SET SSM_URL=https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPluginSetup.exe | |
SET DBEAVER_URL=https://dbeaver.io/files/dbeaver-ce-latest-x86_64-setup.exe | |
echo Tools installation started | |
echo ========================== | |
echo Downloading AWSCLI | |
powershell.exe -command "& Invoke-WebRequest -uri %AWS_CLI_URL% -OutFile C:\AWSCLIV2.msi" | |
echo Running install for AWSCLI | |
start /WAIT C:\AWSCLIV2.msi /q | |
if %ERRORLEVEL% == 0 ( | |
echo AWSCLI installed successfully | |
) else ( | |
echo Failed to install AWSLI | |
SET AWS_STATUS=1 | |
) | |
echo Downloading ssm-plugin | |
powershell.exe -command "&Invoke-WebRequest -uri %SSM_URL% -OutFile C:\SSM.exe" | |
echo Running install for sam-plugin | |
start /WAIT C:\SSM.exe /q | |
if %ERRORLEVEL% == 0 ( | |
echo SSM plugin installed successfully | |
) else ( | |
echo Failed to install SSM plugin | |
SET SSM_STATUS=1 | |
) | |
echo Downloading DBeaver | |
powershell.exe -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &Invoke-WebRequest -uri %DBEAVER_URL% -OutFile C:\dbeaver.exe" | |
echo Running install for DBeaver | |
start /WAIT C:\dbeaver.exe /q | |
if %ERRORLEVEL% == 0 ( | |
echo DBeaver installed successfully | |
) else ( | |
echo Failed to install DBeaver | |
SET DBEAVER_STATUS=1 | |
) | |
if %AWS_STATUS% == 1 set STATUS=1 | |
if %SSM_STATUS% == 1 set STATUS=1 | |
if %DBEAVER_STATUS% == 1 set STATUS=1 | |
if %STATUS% == 0 ( | |
echo Tools installation finished successfully | |
) else ( | |
echo Tools installation finished with errors: | |
if %AWS_STATUS% == 1 echo AWS STATUS: FAILED | |
if %SSM_STATUS% == 1 echo SSM STATUS: FAILED | |
if %DBEAVER_STATUS% == 1 echo DBEAVER STATUS: FAILED | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment