17 lines
603 B
PowerShell
17 lines
603 B
PowerShell
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=${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 } |