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