major update to override Write-Output func
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user