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
@@ -5,11 +5,11 @@ $MSIURL = 'https://enscape-installer.chaosgroup.com/installer.enscape.io/Enscape
$INSTALLER = Download-File -URL $MSIURL
Write-Output "Installing Enscape from ""${INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart ACCEPTEULA=1 ALLUSERS=1" -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 }