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
+4 -4
View File
@@ -24,13 +24,13 @@ Write-Output "Removed Paths:`n`r${REMOVE_PATH}"
Try { Set-ItemProperty -Path $REG_ENVVAR -Name Path -Value $NEW_PATH }
Catch
{
LogErr $_.Exception.Message
LogErr "Failed to cleanup system path, using original values"
Write-Error $_.Exception.Message
Write-Error "Failed to cleanup system path, using original values"
Try { Set-ItemProperty -Path $REG_ENVVAR -Name Path -Value $CURRENT_PATH }
Catch
{
LogErr $_.Exception.Message
LogErr "This is not good... !! DO NOT RESTART UNTIL SYSTEM PATH IS FIXED !!"
Write-Error $_.Exception.Message
Write-Error "This is not good... !! DO NOT RESTART UNTIL SYSTEM PATH IS FIXED !!"
Exit
}
}