major update to override Write-Output func

This commit is contained in:
2023-10-05 13:11:38 -04:00
parent 31a06a9206
commit bbb4884818
52 changed files with 377 additions and 378 deletions
+2 -2
View File
@@ -26,12 +26,12 @@ $UninstallScript = Download-File -URL $UninstallScriptURL
$ScriptArgs = "/ALL /QUIET /NOCANCEL"
# Run the script
LogMsg "Uninstalling all Click2Run versions of Office"
Write-Output "Uninstalling all Click2Run versions of Office"
Try { Start-Process "cscript.exe" -ArgumentList "//nologo ""${UninstallScript}"" ${ScriptArgs}" -Wait }
Catch { LogErr $_.Exception.Message }
# Delete the downloaded script
If ( Test-Path $UninstallScript ) {
LogMsg "Deleting downloaded script: ""${UninstallScript}"""
Write-Output "Deleting downloaded script: ""${UninstallScript}"""
Remove-Item -Path $UninstallScript -Force -ErrorAction SilentlyContinue
}