major change to override Write-Error func

This commit is contained in:
2023-10-05 13:17:18 -04:00
parent bbb4884818
commit 5f4b4565de
42 changed files with 114 additions and 114 deletions
+2 -2
View File
@@ -10,11 +10,11 @@ If (! (Test-Path "${Env:ProgramFiles}\4KDownload\4kvideodownloader\4kvideodownlo
## Install the app
Write-Output "Installing 4K Video Downloader from ""${INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart" -Wait }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
## Delete the installer
Write-Output "Deleting downloaded installer from ""${INSTALLER}"""
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
}
Else { Write-Output "4K Video Downloader is already installed!" }