major change to override Write-Error func
This commit is contained in:
@@ -22,14 +22,14 @@ If ($RunningProcess) {
|
||||
$INSTALLER = Download-File -URL $MSIURL
|
||||
Write-Output "Installing Liquid Files Outlook Agent from ""${INSTALLER}"""
|
||||
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart ${INSTALLER_ARGS}" -Wait -ErrorAction Stop }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
Catch { Write-Error $_.Exception.Message }
|
||||
|
||||
# Delete installer
|
||||
Try {
|
||||
Write-Output "Deleting downloaded installation package"
|
||||
Remove-Item $INSTALLER -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
Catch { Write-Error $_.Exception.Message }
|
||||
|
||||
# Start the agent
|
||||
$PathToAgentExe64 = "${Env:ProgramFiles(x86)}\LiquidFiles Windows Agent\LiquidFilesWindowsAgent.exe"
|
||||
@@ -42,5 +42,5 @@ If ( Test-Path $PathToAgentExe64 ) {
|
||||
If ($PathToAgentExe) {
|
||||
Write-Output "Starting LiquidFiles agent"
|
||||
Try { Start-Process $PathToAgentExe }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
Catch { Write-Error $_.Exception.Message }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user