This commit is contained in:
2020-07-31 12:44:03 -04:00
parent c3daf96353
commit 6f65b0707f
5 changed files with 30 additions and 12 deletions
+12 -3
View File
@@ -1,7 +1,16 @@
## Get the correct URL
param(
[int]$Version=11
)
## Supported versions: 8 and 11
## Convert int to string
[string]$Version = $Version.ToString()
## Get the correct URL
If ( Test-Path "${Env:ProgramFiles(x86)}" )
{ $URL = 'https://corretto.aws/downloads/latest/amazon-corretto-11-x64-windows-jdk.msi' }
Else { $URL = 'https://corretto.aws/downloads/latest/amazon-corretto-8-x86-windows-jdk.msi' }
{ $URL = "https://corretto.aws/downloads/latest/amazon-corretto-${Version}-x64-windows-jdk.msi" }
Else { $URL = "https://corretto.aws/downloads/latest/amazon-corretto-${Version}-x86-windows-jdk.msi" }
## Install Amazon Corretto
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i ${URL} /qn /norestart" -Wait
-8
View File
@@ -1,8 +0,0 @@
@echo off
SET INSTALL_URL=https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/LiquidFiles_Admin_2.0.108.msi
IF NOT [%1] EQU [] SET REG_SETTINGS=%REG_SETTINGS%BaseUrl=%1;
REM Install the plugin
msiexec.exe /i %INSTALL_URL% /qn /norestart REGKEYSCRIPT="%REG_SETTINGS%"
+17
View File
@@ -0,0 +1,17 @@
param(
[string]$URL,
[string]$INSTALLER='https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/LiquidFiles_Admin_2.0.114.msi'
)
## Set installer args
If ( $URL )
{
Write-Output "LiquidFiles target server: ${URL}"
$INSTALLER_ARGS = 'REGKEYSCRIPT="BaseUrl={0};"' -f $URL
}
Else { $INSTALLER_ARGS = '' }
## Run the installer
Write-Output "msiexec.exe /i ${INSTALLER} /qn /norestart ${INSTALLER_ARGS}"
Try { Start-Process -FilePath "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart ${INSTALLER_ARGS}" -Wait }
Catch { Write-Output $_.Exception.Message }
+1 -1
View File
@@ -37,5 +37,5 @@ elif [ -n "$(command -v yum)" ]; then
elif [ -n "$(command -v dnf)" ]; then
process_fedora
else
echo "Package update command not found!"
echo "Package manager not found!"
fi